Find latest date of colored cells from a range of colored and no fill cells

Timaxrus

New Member
Joined
May 23, 2018
Messages
5
Hello, guys!
I need your help on one project.
V1V2V3V4V5V6
12-Apr-201813-Apr-201814-Apr-201815-Apr-201816-Apr-201817-Apr-2018

<tbody>
</tbody>

my-drive
Let's assume V1, V2, V3, V4 cells are color filled with green, others are not. And I need to find the latest date from that colored range (it should pick from colored cells, because late the other cells are also colored) and return it with the value above it like "V4 13-Apr-2018".
I need that info in a separate cell.
Thank you in advance.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi guys!
I thought it would not be difficult for people here. Still I am waiting for your help for my above issue. please help me
 
Upvote 0
Can you attach a short Excel ,sample to see how your data is.
is it "V4 13-Apr-2018" or "V4 15-Apr-2018"
What is the color the fill color code: Which Green?
 
Last edited:
Upvote 0
What is the range to cover, only V1 to V6
 
Upvote 0
Sorry guys... the modification of my above question...
Lets assume
1. A1=Visit 1, B1=Visit 2, C1=Visit 3, D1=Visit 4, E1=Visit 5.
2. A2=12.04.2018, B2=13.04.2018, C2=14.04.2018, D2=15.04.2018, E2=16.04.2018
From row 2 dates are color filled till "15.04.2018" with green (36). And I would like a function in a cell that returns the latest date based on color fill and visit info above it.
In my case here it would be "Visit 4 15.04.2018". Thanks for your time!!!
 
Upvote 0
Is the color fill prepared with a Conditional Format.
If yes, what is the condition used
Can you give more detail about the 36, is it a colorIndex ??
 
Last edited:
Upvote 0
Here a possibility, the function is just checking if there is a fill color change, no reference to the green (36).
If there is no color found the displays is
"No End Color Date"
It does not work with Conditional Format
Somewhere put
=EndColor(A2:E2)

Code:
Function EndColor(WkRg As Range) As String
Dim I  As Integer
    EndColor = "No End Color Date"
    With WkRg
        For I = 2 To WkRg.Count + 1
            If (.Cells(1, I - 1).Interior.ColorIndex <> .Cells(1, I).Interior.ColorIndex) Then _
               EndColor = .Cells(1, I - 1).Offset(-1, 0) & " - " & .Cells(1, I - 1)
        Next I
    End With
End Function
"
 
Last edited:
Upvote 0
No, that is not conditional formatting. That is updated manually and I have another file that gets autoupdated based on the first file
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,380
Members
448,955
Latest member
BatCoder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top