How can get the latest date of updating

68 views
Skip to first unread message

Dr. AHMED Al-Wasity

unread,
Nov 15, 2024, 9:00:20 AM (9 days ago) Nov 15
to Google Apps Script Community

I need a function to get last date of update.

Last date of update means the latest date from range (D14:AG14) of the following conditions: 

  • the last column in the range (D15:AG124) contains data (Text, number) or
  • the last cell in the range (D10:AG10) is (true) or 
  • the last cell in the range (D11:AG11) is (true) or
  • the last cell in the range (D12:AG12) is (true) .

see the attached google sheet

https://docs.google.com/spreadsheets/d/1MIOp4gW3jm9Vk26NlXnqmyqsZM7a-bHkwrlCEPAXY8I/edit?usp=sharing

Thanks

Keith Andersen

unread,
Nov 15, 2024, 9:40:44 AM (9 days ago) Nov 15

Dr.,
Honestly and respectfully, this forum is to supplement your knowledge and learning. It appears as if you are building your project step by step through this forum. It would be more advantageous to hire a coder for your needs given your limited base of spreadsheet application.

I have many projects going right now that severely limit my availability. Sorry.

Keith



My website: https://sites.google.com/view/klaweb/
Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/2e40c699-c36b-4572-9300-727d04bdb40dn%40googlegroups.com.

Dr. AHMED Al-Wasity

unread,
Nov 15, 2024, 9:47:01 AM (9 days ago) Nov 15
to Google Apps Script Community
Hi
This function (Get last update Date) was working correctly before applying the script of setting value. I do not know what is the problem after applying the script and setting value in the range? I just have a problem in writing the script so I asked the forum to learn and ear knowledge. 

Brent Guttmann

unread,
Nov 15, 2024, 8:14:20 PM (8 days ago) Nov 15
to Google Apps Script Community
=IFERROR( TEXT( INDEX(D14:AG14, MAX( IFERROR(MAX(FILTER(COLUMN(D10:AG10)-COLUMN(D10), D10:AG10<>"")), 0), IFERROR(MAX(FILTER(COLUMN(D11:AG11)-COLUMN(D10), D11:AG11<>"")), 0), IFERROR(MAX(FILTER(COLUMN(D12:AG12)-COLUMN(D10), D12:AG12<>"")), 0), IFERROR(MAX(FILTER(COLUMN(D15:AG120)-COLUMN(D10), BYCOL(D15:AG120, LAMBDA(col, COUNTA(col)>0)))), 0) )), "ddd, mmm dd, yyyy" ), "No Data" )

Dr. AHMED Al-Wasity

unread,
Nov 16, 2024, 6:19:32 AM (8 days ago) Nov 16
to Google Apps Script Community
Many thanks Brent for your efforts

Garrett Howe

unread,
Nov 19, 2024, 2:20:16 AM (5 days ago) Nov 19
to Google Apps Script Community
Hello, this is a great thread.
Reply all
Reply to author
Forward
0 new messages