Vlookup with a twist
Posted by Clive le Roux on November 01, 2001 12:55 PM
I have 2 worksheets. Worksheet 1 has rows with names and the number of columns used for each row varies. e.g
name1 col1 col2 col3 col4
name2 col1 col2 col3
name3 col1
name4 col1 col2 col3 col4 col5 col6
in worksheet 2 I want to lookup the last used column on worksheet 1 for each name using the vlookup formula, however with vlookup you need to specify the column.
The following formula works, but how can I can I replace the "Sheet1!$1:$1" with a row variable instead of being fixed?
=VLOOKUP("name1",archiving,MATCH(0, Sheet1!$1:$1, -1),TRUE)
Any ideas?
Thanks
Clive