0
votes

I have two spreadsheets in my workbook. The first one shows in each line a transaction with its ID and also a checkbox. I need this to be checked or unchecked, depending a value of the second spreadsheet.

The second sheet holds more data for transactions. Again with IDs in the first column.

What I basically need, is a vlookup to connect the checkbox to its value via the ID cells in each spreadsheet. Is that somehow possible without writing it completely in vba? My problem is, that there are more columns in sheet2 than in sheet1, so I can't say, that the value for checkbox in sheet1.cells(2,5) is in sheet2.cells(2,24). I need to search for the line number.

It did not seem to work, if I just put a vlookup in the value field for the checkbox.

1

1 Answers

0
votes

Are you just looking to see if the value exists?

If so, you could do this quite easily with a Vlookup.

If you cell link the lookup cell to the checkbox, then wrap you VLOOKUP in a condition (something like =if(iserror(Vlookup(A1,B2:D50,2,false)) it will convert it to a boolean - which is what makes the checkbox tick.

I hope that helps