I’m always struggling when it comes using defined ranges and then looping through cells and doing some using calculations or actions. I really need to learn to do this better. Please don’t laugh.


Anyhow
In first subroutine range card_lookup_rng is set as below. Within this range some of these cells have card values such as 2s, 3s, 4s (e.g - 2, 3, 4 of spades etc…).

I want to call up a sub routine “sub find_a_card_from_database” and start to loop through the relevant cells within that defined range of card_lookup_rng
I would like the code to look up and match each individual values from cards database sheet (col A), find the row number of match, and then copy the relevant cell from column B (which contains a picture of the card and the formatting of the cell). Now it should simply replace the cell on the original sheet. Alternatively the code could just find the shapes “2s”, “3s” from that sheet and place them inside the cell (Centre horizontal, centre vertical) within the defined range. Not sure which way would be more efficient.


So in simplified way range card_lookup_rng contains just a text which I want to replace with some nice looking cards. So maybe something along the lines as below (which does not work but does not error out either). I just don’t know how to do this properly.

Any help would be very much appreciated.

Please Login or Register  to view this content.