How do I compare two tables in VBA?

toddswint1

New Member
Joined
Jan 31, 2014
Messages
8
Hello, I am working on a project to dynamically illustrate a guitar scale on a fretboard. At this point the image count is around 2000.

I have two identical tables. Table 1 contains true/false statements that indicate, based on selected assumptions, whether an image should be displayed of not for that position. Table 2 contains the corresponding image names for table 1.

Question 1: How do I write a procedure that, upon worksheet change event, the code will look for the TRUE statements in table 1 and set the visible property to TRUE for the corresponding images named in Table 2 while setting the visible property to FALSE for the other images?

Question 2: Given the same table scenario above, how do I write the code so that the comparison of the tables is made cell by cell from top to bottom and left to right?

Thank you very much for taking time to help with this. I am a novice in vba but very interested. Todd
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
hello, Todd

I read question 1 and think "just put a simple formula". There are two identical tables.
so if sheet 1 has table 1 with cells A2, etc
in table 2 cell A2 have formulas like =sheet1!A2

then when table 1 is TRUE, table 2 will show TRUE
when table1 is FALSE, table2 will show FALSE
No worksheet change event required. No VBA

I'm expecting this is not the answer you're after.

So, please can you provide some further description so that the requirement is clearer?

thanks & regards, Fazza
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

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