Conditional Format using vlookup, indirect and table reference

LocalManMark

New Member
Joined
Jun 12, 2014
Messages
1
Hi All,

This is my first post so please be patient.

I have simplified what I want to achieve in the following example using kids building blocks of different sizes.

First I have a reference table called BlockTypes

BlockSize
A1
B1
C2

<tbody>
</tbody>

I then have a table that lists the spaces and what block is in each space Table1
SpaceBlock
1A
2B
3C
4
5A
6B
7C
8

<tbody>
</tbody>

So the logic above is that because Space 3 contains a block of type C it takes up 2 spaces, Therefore nothing can go into Space 4. The same goes for Space 7 and 8. (I do hope I'm explaining this well :rolleyes:.)


What I want to achieve: I want to create a conditional format to Fill the block cell for 4 and 8 black.

Formula's I have tested
Ideally I would like to use this formula as a conditional format

=NOT(ISERROR((VLOOKUP((INDIRECT(ADDRESS(ROW()-1,COLUMN()))),BlockTypes,2,FALSE)=2)))

This works as a cell formula but not as a "Conditional Format" Formula

The following simple fomula works but would be difficult to manage if more blocks with different sizes were introduced.

=INDIRECT(ADDRESS(ROW()-1,COLUMN()))="C"

Theory on Issue
I am wondering if this issue is to do with the reference to the Table "BlockTypes", but I can't see any other way around it.

Hope someone can understand my question and help :biggrin:
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,215,338
Messages
6,124,356
Members
449,155
Latest member
ravioli44

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