stoffn
Goto Top

Excel oder google Sheets automatisch aktualisieren bei neuen Werten?

Hallo! Ich habe ein paar technische Fragen, deshalb habe ich mich mal hier angemeldet (ich muss auf Arbeit einige Sonderaufgaben noch übernehmen, daher brauche ich etwas Hilfe). Und es geht gleich los:
Ziel ist, etwas zu entwickeln (script, Abfrage, etc) bzw. etwas zu finden, was mit Office365, besser aber google sheets zu nutzen wäre. Es geht um eine Abdeckung, in der täglich neue Werte eingetragen werden und damit man nicht mühsam jeden Tag die einzelnen Tabellen/Spalten durchsehen muss, soll der letzte Wert automatisch ausgelesen werden.
Problemstellung: Es ist eine Tabelle vorhanden (die Abdeckung). In diesen werden nach unten hin immer wieder Werte eingetragen.
Mir soll nun immer angezeigt werden, wenn ein neuer Wert eingetragen wurde.
Wird z.B. "Nacht" eingetragen in A8, soll eine 1 in die Zelle A2 (oder irgendeine andere Zelle) eingetragen werden.
Wird dann z.B. am nächsten Tag dann in A9 "Tag" eingetragen, dann erscheint wieder eine 0 in A2.
Jede neue Zeile kann theoretisch als neuer Tag gesehen werden.
Ziel ist, dass das dynamisch bleibt und man nicht alte Werte erst löschen muss. Es soll also immer der letzte Wert, sprich der 1. Wert von unten, genutzt werden.
Und je nach dem, was da drin steht, soll oben eine 1 oder 0 in A2 geschrieben werden.
Jmd trägt also etwas ein, die 1 in A2 gibt die Benachrichtigung dafür (dieser Wert wird in einer anderen Tabelle genutzt) und am nächsten Tag (oder ein paar Tage später) trägt wieder jmd. etwas anderes ein, was A2 dann wieder auf 0 setzt und die Benachrichtigung bzw. den Faktor wieder wegnimmt.
Ich hatte das theoretisch schon am Laufen, nur eben nicht, dass immer der aktuelle Wert genutzt wird. Ich musste immer die alten Werte ändern, damit die Tabelle sozusagen wieder zurückgesetzt wird und der neue Wert (der dann wieder für 0 steht) genutzt wird. Und hier kommt ihr jetzt ins Spiel. Wie ist das am besten zu machen, was ist der Ansatz, sollten das Macros sein, gibts da für google sheets irgendwelche Scripte? Es soll nur noch Tag oder Nacht eingegeben werden, A2 soll mir das aktuellste ausgeben (0 oder 1) und ich muss keine alten Werte löschen/ändern.

Alternativ kann ich auch eine Planungssoftware nutzen, welche das vlt. alles von sich aus kann. Mit sowas kenne ich mich aber nicht aus. Wenn jmd. jedoch einen Tipp hat, wäre das klasse. Am besten eingebettet in google Drive oder zumindest browserbasiert.

Ich bedanke mich schon mal!

Content-Key: 314491

Url: https://administrator.de/contentid/314491

Printed on: April 24, 2024 at 03:04 o'clock

Mitglied: 129813
129813 Sep 06, 2016 at 08:47:30 (UTC)
Goto Top
Member: Stoffn
Stoffn Sep 06, 2016 at 09:16:38 (UTC)
Goto Top
Achja, ich hätte vlt sagen sollen, dass ich noch recht unbedarft bin, was javascript etc. angeht. Sprich, ein paar wenige Erläuterungen wären ganz gut eigentlich.
Mitglied: 129813
129813 Sep 06, 2016 at 09:38:51 (UTC)
Goto Top
I don't understand your description above it's very confusing sorry.

You only need the reference for it
https://developers.google.com/apps-script/reference/spreadsheet/sheet
Member: Stoffn
Stoffn Sep 06, 2016 at 10:42:00 (UTC)
Goto Top
I think it's hard to understand in english. I got not so much knowledge in coding, that's the problem.
I want to check the last value in a row (e.g. column A). If this value is "day", it shall return 1 in, for example, A2 and if it's the value "night", it shall return 0 in A2. Got it? Every row can be seen as a new day, but not all days have values! Sometimes, you have 3 days in a row with now values. But if you enter "night" on the 4th day (4th row) it shall return 0.

Example:
A5 -> "night" then A2= 0
A6-> "day" then A2=1
A8-> "night" then A2=0

and so on
Mitglied: 129813
129813 Sep 06, 2016 updated at 11:35:37 (UTC)
Goto Top
Then you only need a formula like this in A2 (copy down)
=IF(INDEX(B2:Z2;1;LARGE((B2:Z2<>"")*COLUMN(B2:Z2);1)-1)="night";0;1)
It calculates the last used cell compares that to your value and sets your desired value 0 or 1.
In this example i used columns A:Z max, but you can adjust it to your needs.

Regards
Member: Stoffn
Stoffn Sep 06, 2016 at 12:10:47 (UTC)
Goto Top
But it's supposed to work vertical. So it needs to count the rows down (value A2 depends on last value in A3:A). Same procedure is for B (B2 depends on the last value values in B3:B)
Mitglied: 129813
129813 Sep 06, 2016 updated at 12:32:51 (UTC)
Goto Top
you have 3 days in a row
Oh lord, then you only have to swap it ... face-confused
=IF(INDEX(A3:A10000;LARGE((A3:A10000<>"")*ROW(A3:A10000);1)-2)="night";0;1)  
https://thehosblog.com/2013/05/04/excel-letzte-beschriebene-zeile-ermitt ...
Member: Stoffn
Stoffn Sep 06, 2016 at 13:29:16 (UTC)
Goto Top
I had to make some adjustments, since my sheet is more complex (I only wanted to give a simple example to you and find out the rest by myself).
I'm close to my final solution. I just need one more thing. It shall count not only "night" but also night1, night###, night 1232, etc. The returned value stays the same too. Wildcard is needed (night*). But this isn't working. Do I have to make a Countif for that?
Mitglied: 129813
129813 Sep 06, 2016 updated at 14:21:38 (UTC)
Goto Top
To count all cells which are beginning with night you use countif and the wildcard:
=COUNTIF(A3:A10000;"night*")
Works without problems in Google-Spreadsheets.
Mitglied: 129813
129813 Sep 06, 2016 updated at 14:35:05 (UTC)
Goto Top
If that's all please mark the thread as solved. Thanks.

Regards
Member: Stoffn
Stoffn Sep 06, 2016 at 14:36:58 (UTC)
Goto Top
Yes I know, but how do I implement it in my IF-function?
It's like this now

=IF(INDEX(J15:J200;LARGE((J15:J200<>"")*ROW(J15:J200);1)-14;)="night";1;0)  
Sorry, I have to do a lot of work at the same time, therefore I have to rethink all the time.
Mitglied: 129813
Solution 129813 Sep 06, 2016 updated at 14:48:58 (UTC)
Goto Top
simply use the left() function to compare only the beginning 5 characters (night) of the content ;-P
=IF(LEFT(INDEX(J15:J200;LARGE((J15:J200<>"")*ROW(J15:J200);1)-14);5)="night";1;0)  

Explained:

The result of this is part is the cell content of the last used cell
INDEX(J15:J200;LARGE((J15:J200<>"")*ROW(J15:J200);1)-14)
Then you get the left 5 characters of the result and compare it right with the string "night"
LEFT(INDEX(J15:J200;LARGE((J15:J200<>"")*ROW(J15:J200);1)-14);5)="night"
That's all ...

Sorry, I have to do a lot of work at the same time, therefore I have to rethink all the time.
And we are your "assistents" only because you have no time?! whoops ...

Next time directly post the Google-Sheet via a link, that's easier and faster for all to know what you really want to do.

Good luck, I'm out now.

Regards
Member: Stoffn
Stoffn Sep 07, 2016 at 08:47:37 (UTC)
Goto Top
No, I just used excel a few years ago, so I needed some guidance. Just a bad formulation. And you helped me. I'll try your method.
Thanks a lot, you were a big help!
Regards
Member: Stoffn
Stoffn Sep 07, 2016 at 09:07:09 (UTC)
Goto Top
Your solution is just genius