elninohaginho
New Member
- Joined
- Oct 17, 2017
- Messages
- 12
Hello,
I am trying to bruteforce myself through some of the VBA obstacles (mostly because I am a beginner and don't know how to code this properly) and have just encountered one that I can't overcome.
The basic idea is the following:
My VBA macro is finding a first empty cell in column D and selects it. There are some e-mail addresses in column C that I want to run a vlookup on, so in the cell selected I set value =IFNA(VLOOKUP(OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),0,-1),Functions!A1:I176,9),VLOOKUP(OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),0,-1),Functions!A1:I176,8)) and autofill it in column D to run it on all of the e-mail addresses in column C.
The idea behind this formula is basically this:
A VLOOKUP is run on the currently selected cell offset by 1 column. If it finds no data in column 9 in Functions sheet, it proceeds to look for the value in column 8, which is always filled.
I have tried IFERROR and ISBLANK nested in IF, but for some reason I am still getting the N/A error when there is no data in column 9, however if there is some data in this column, I am receiving it correctly.
Can someone please be so kind and help me get my head around this error? If you can't or don't want to help me but got this far, let me at least congratulate you on your persistence and wish you a great day!
I am trying to bruteforce myself through some of the VBA obstacles (mostly because I am a beginner and don't know how to code this properly) and have just encountered one that I can't overcome.
The basic idea is the following:
My VBA macro is finding a first empty cell in column D and selects it. There are some e-mail addresses in column C that I want to run a vlookup on, so in the cell selected I set value =IFNA(VLOOKUP(OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),0,-1),Functions!A1:I176,9),VLOOKUP(OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),0,-1),Functions!A1:I176,8)) and autofill it in column D to run it on all of the e-mail addresses in column C.
The idea behind this formula is basically this:
A VLOOKUP is run on the currently selected cell offset by 1 column. If it finds no data in column 9 in Functions sheet, it proceeds to look for the value in column 8, which is always filled.
I have tried IFERROR and ISBLANK nested in IF, but for some reason I am still getting the N/A error when there is no data in column 9, however if there is some data in this column, I am receiving it correctly.
Can someone please be so kind and help me get my head around this error? If you can't or don't want to help me but got this far, let me at least congratulate you on your persistence and wish you a great day!