Bring back last grey colour column

Sat2021

New Member
Joined
Jan 18, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hi

I have a large spreadsheet with dates going across the top and plot numbers on the side.

Then across the top i have dates and the cells have various number 1-12 (does include 'BC & 'LC' & 'CP') as well.

Various cells are colored in different colors and for example one row might have 10 cells with the color grey what i want to do is bring back the value from the last grey colored cell for each row?

Please see attached example. So for the first line i would like it bring back 'C&P' and for the fourth line down id like it bring back 12.

1610971649232.png


Thanks,

Sat
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
On sheet CELLCOLOR i have made a blueprint with the cellcollors of sheet DATA.
I have used a old xlm-macro GET.CELL. This macro is only working in a name. So you need the namemanager to create a name with a formula.
The name: CellColor
The formula: =GET.CELL(63,INDIRECT(ADDRESS(ROW(),COLOM(),,,"data")))

In the sheet DATA i use the function SUMPRODUCT for the last value of the colornumber 15. Maybe you have an other number.
=INDEX(C2:M2,1,SUMPRODUCT(LARGE((data!C13:M13=15)*(COLUMN(C13:M13)-COLUMN(C13)+1),1)))

Map3
ABCDEFGHIJKLM
1Plot No.Last value18-jan25-jan1-feb8-feb15-feb22-feb1-mrt8-mrt15-mrt22-mrt29-mrt
2128725102118104
3289368667101510
43C&P5957749C&P877
5410973102143241
653545107385737
762623651021175
87BC845BC24974810
9891529261033910
109151658622497
11109598261065571
data
Cell Formulas
RangeFormula
B2:B11B2=INDEX(C2:M2,1,SUMPRODUCT(LARGE((data!C13:M13=15)*(COLUMN(C13:M13)-COLUMN(C13)+1),1)))


Cell Formulas
RangeFormula
A1:M11A1=CellColor
 
Upvote 0
could you send me your excel spreadsheet with working please?
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

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