Ironman
Well-known Member
- Joined
- Jan 31, 2004
- Messages
- 1,069
- Office Version
- 365
- Platform
- Windows
Hi
The below formula relates to Post #9 of this thread
The below are Columns A & B from the most recent entries from sheet 'Training Log' that runs from A12:A36000
The formula above returns the most recent exercise activity date and works perfectly. However, I've been extremely reliably informed that what I now need in addition can only be done using VBA, and it would probably be a neater solution if it replaced the above formula as well.
I need the result cell (A8) fill colour to match the colour of the relevant cell. For the above table, this means I need the result cell to be filled the same colour (blue) as the most recent cell in column B that is not "REST".
I guess that's clear, but here's another table for another example
If this was the most recent exercise, I would expect the fill colour of the result cell A8 in this instance to be the same shade of green.
A solution would be greatly appreciated.
Many thanks!
The below formula relates to Post #9 of this thread
Excel Formula:
SWITCH(TODAY()-MAXIFS(A12:A36000,B12:B36000,"<>REST",B12:B36000,"<>"),0,"Last Exercise Today",1,"Last Exercise Yesterday","Last Exercise " &TEXT(MAXIFS(A12:A36000,B12:B36000,"<>REST",B12:B36000,"<>"),"dd/mm/yyy"))
The below are Columns A & B from the most recent entries from sheet 'Training Log' that runs from A12:A36000
Sun, 1 Aug 2021 | Cullingworth Rd/Viaduct/ Stn Road/Old Allen Road Back Lane/Wilsden Rd/ Cottingley Rd/Lee Lane/ Cross Lane/Coplowe Ln/ Crack Lane/Main Street/ Harden Ln/Mill Hill Top/ Wilsden Rd/Mad Mile/ Greenside Lane (21/02/2020) |
Mon, 2 Aug 2021 | OTHER |
Tue, 3 Aug 2021 | REST |
Wed, 4 Aug 2021 | OTHER |
Thu, 5 Aug 2021 | Hallas Br/Down Bents Ln Harden Lane/Smithy Ln/ Lee Farm/Black Hills/ Golf Course/R down Beck Foot Lane/Wagon Lane/ Up LLC to cannon monument/Back to 3-Rise Locks & over Br/ Brown Cow/Main Road all the way back home (22/04/2007) |
Fri, 6 Aug 2021 | OTHER |
Sat, 7 Aug 2021 | REST |
Sun, 8 Aug 2021 | OTHER |
The formula above returns the most recent exercise activity date and works perfectly. However, I've been extremely reliably informed that what I now need in addition can only be done using VBA, and it would probably be a neater solution if it replaced the above formula as well.
I need the result cell (A8) fill colour to match the colour of the relevant cell. For the above table, this means I need the result cell to be filled the same colour (blue) as the most recent cell in column B that is not "REST".
I guess that's clear, but here's another table for another example
Mon, 2 Aug 2021 | OTHER |
Tue, 3 Aug 2021 | REST |
Wed, 4 Aug 2021 | OTHER |
Thu, 5 Aug 2021 | Hallas Br/Down Bents Ln Harden Lane/Smithy Ln/ Lee Farm/Black Hills/ Golf Course/R down Beck Foot Lane/Wagon Lane/ Up LLC to cannon monument/Back to 3-Rise Locks & over Br/ Brown Cow/Main Road all the way back home (22/04/2007) |
If this was the most recent exercise, I would expect the fill colour of the result cell A8 in this instance to be the same shade of green.
A solution would be greatly appreciated.
Many thanks!
Last edited: