pivot table Vlookup to return cell colour and font

T15MAF

New Member
Joined
Feb 12, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi,

1st post here, so a big Hi to everyone.

I am trying to return the cell colour and font format using a vlookup on the pivot table (see below snip) I can get the Vlookup to return the risk ranking number but I don't know how to get it to return the cell colour and font. I have a data validation for the impact and likelihood so when i change these values it gives me the corresponding risk rating but not the colour of the cell and the font. I know i have to use VBA for this but not sure what code to write ort even if this is possible.... Any excel boffins out there that can help me out

1676239610327.png

Thanks in advance, Mark
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
can you make another grid for the colour and then you can use conditional formatting
with a grid lookup - so you would have a 1,2,3 or blank for each colour

not sure it can be worked out from the grid without vba to pick up the colour - BUT there maybe a way .....

Book2
ABCDEFGHIJKLMNOP
1
2imapctlikelihoodrisk12345678
3g34a89101112131415
4g12b7891011121314
5f68c678910111213
6b511d56789101112
7g67e4567891011
8b713f345678910
9d812g23456789
10e47h12345678
11a815
12
13
14
15
16COLOURSlikely hood
1712345678
18a12222222
19b11222222
20c11122222
21d111222
22e11111
23f3333
24g333
25h33
26
27
Sheet1
Cell Formulas
RangeFormula
C3:C11C3=INDEX($H$3:$O$10,MATCH($A3,$G$3:$G$10,0),MATCH($B3,$H$2:$O$2,0))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H18:O25Expression=H18=1textNO
H18:O25Expression=H18=2textNO
H18:O25Expression=H18=3textNO
A3:C11Expression=INDEX($H$18:$O$25,MATCH($A3,$G$18:$G$25,0),MATCH($B3,$H$17:$O$17,0))=1textYES
A3:C11Expression=INDEX($H$18:$O$25,MATCH($A3,$G$18:$G$25,0),MATCH($B3,$H$17:$O$17,0))=2textNO
A3:C11Expression=INDEX($H$18:$O$25,MATCH($A3,$G$18:$G$25,0),MATCH($B3,$H$17:$O$17,0))=3textNO
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,311
Members
449,080
Latest member
jmsotelo

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