Display image in cell based on VLookup value

Hi Team

First-time poster and, Libre Calc user; after decades of VBA.

Proof-of-Concept project to better familiarise myself with “Basic”: I am building a Slot/Pokies Machines.

I have a VLookup Range: Coding!$B$2:$C$10. Currently $C2:$C$9 has “Special Characters” that display the picture (In the Reel Window), based on the matching value.

I use a VLookup (which works perfectly), but! I am looking to go the extra step, improve upon the “Special Characters” by using Shapes/Images.

Can Calc/Basic do this…?? I am thinking of a SELECT CASE:

(MY VBA Eqivalent pseudo-kinda example) :slight_smile:

Blockquote

Dim rShapeVal AS Range: Set rShape = Sheets(“Coding”).Range(“B2:C10”)

Select Case rShapeVal
Case = 1
myShape01.Background.Image.Name=“Img01”
Case = 2
myShape02.Background.Image.Name=“Img02”

Etc… to myShape15

End Select

Blockquote

I have total of 15 “Cells” (5 Columns [Reels] x 9 Rows). Only 3 of the rows are visible as these are the [Pay-lines]).

TIA
Mark.

I’m not sure if this is the trick you’re asking about.

Here is an another sample:

ShowShape.ods (15.2 KB)