Match a colored cell with the cell next to it

Slumbery

New Member
Joined
Dec 22, 2017
Messages
6
Hey there, I am trying to find a formula to match a colored cell with value of the cell next to it and display that value in a separate cell (copy). Here is an example:
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1/14/2018[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]1/15/2018[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]1/18/2018[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]1/19/2018[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So if we have something like this (red texts are the the colored cells). Now, whats happening here is the dates are colored as days progress. Now in cell C, it should display whatever the last colored cell with the corresponding number next to it in A. So for today, it display 6 in C1, as days progress, it should display 7 in C1 as B4 becomes highlighted in red.

Here is how it would look like with the formula.
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1/14/2018[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]1/15/2018[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]1/18/2018[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]1/19/2018[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
How are your cells being colored... manually or by means of Conditional Formatting? If Conditional Formatting, what is the condition that makes the cell get colored?
 
Upvote 0
How are your cells being colored... manually or by means of Conditional Formatting? If Conditional Formatting, what is the condition that makes the cell get colored?
It is Conditional Formatting and the condition that makes it get colored is any cell that is less than today's date "=<Today()"
 
Upvote 0
It is Conditional Formatting and the condition that makes it get colored is any cell that is less than today's date "=<Today()"
Assuming Column B is always in ascending order, see if this formula does what you want (change the ranges A1:A100 and B1:B100 to your actual ranges of data)...

=INDEX(A1:A100,COUNTIF(B1:B100,"<"&TODAY()))
 
Upvote 0

Forum statistics

Threads
1,224,836
Messages
6,181,252
Members
453,028
Latest member
letswriteafairytale

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