I have a worksheet with a bunch of tables. The tables are structured, however the Titles (TABLE1, TABLE2) are not part of the actual table. I am trying to make a function that finds which table corresponds to the Title and then looks up at COLUMN3
to return the value SEVEN
. Here's what they look like. I am trying to make this function flexible enough so that if I change the value to TABLE2, it will return GG
.
TABLE1
+---------+---------+---------+----------+
| column1 | column2 | COLUMN3 | column4 |
+---------+---------+---------+----------+
| row1 | xxx | xxx | xxx |
| row2 | xxx | SEVEN | xxx |
| row3 | xxx | xxx | xxx |
| row4 | xxx | xxx | xxx |
+---------+---------+---------+----------+
TABLE2
+---------+---------+---------+----------+
| column1 | column2 | COLUMN3 | column4 |
+---------+---------+---------+----------+
| row1 | bb | cc | dd |
| row2 | ff | GG | hh |
| row3 | zzz | zzz | zzz |
| row4 | zzz | zzz | zzz |
+---------+---------+---------+----------+
I'm not sure where to start. My VBA knowledge is nonexistent, so I'm trying to just figure this out with just one super nested function (though any hints/solutions are welcome). Any ideas? Thanks in advance!