bbb0777
bbb0777

Reputation: 309

Change image based on cell value. Image is larger than a single cell | No VBA

I have cover sheet image that changes depending on the type of report it is.

I'd like the cover sheet image to automatically change, depending on a value selected in another cell. I can think of ways to do this, but two issues:

Everything I know (and have found via Google) requires either VBA, or for the image to be contained within a single cell.

The goal is to save 5 seconds + avoid user error. So nothing huge...but any ideas?

Edit: First response got it - thanks

Thanks,

Upvotes: 0

Views: 457

Answers (1)

Tim Williams
Tim Williams

Reputation: 166146

You're not restricted to using images which can fit "in" a cell (images always float over ranges, they're not contained in cells)

Eg: see screenshot of a simple setup using a 5x2 range for each picture.

There is a named range "PIC_HERE" defined as:

=OFFSET(Sheet1!$F$1,MATCH(Sheet1!$A$4,Sheet1!$E:$E,0)-1,0,5,2)

MATCH() finds the offset for each image, and the last two arguments to OFFSET() return a 5x2 range

The image at B4 is a linked picture with formula =PIC_HERE

enter image description here

Upvotes: 2

Related Questions