chriscusick
Technical User
Hi,
Apologies if this explanation is a little long winded but I want to make sure I cover everything in one go.
I am currently using this:
=IF(H4="EUM",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$A$3:$B$7,2,0),""),"")
to return a result in Cell T4. This works fine for one particular instance but the issue I have is that Cell H4 has 3 different values (its a drop down format) and Cell I4 also has 2, again in drop down format. Depending on what is in Cells H4 & I4 would depend on which Vlookup to use, as the values to be returned would be different for each.
Assuming you are following me so far, this is going to be IMPOSSIBLE using a standard formula, as basically the nesting wont allow me to use that many IF's.
The total number of IF statements, covering everything is:
=IF(H4="EUM",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$A$3:$B$7,2,0),""),"")
=IF(H4="EUM",IF(I4="WARM LEAD",VLOOKUP(J4,Sheet3!$D$3:$E$7,2,0),""),"")
=IF(H4="W/SPACE",IF(I4="WARM LEAD",VLOOKUP(J4,Sheet3!$A$11:$B$15,2,0),""),"")
=IF(H4="W/SPACE",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$D$11:$E$15,2,0),""),"")
=IF(H4="A&M",IF(I4="WARM LEAD",VLOOKUP(J4,Sheet3!$G$3:$H$7,2,0),""),"")
=IF(H4="A&M",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$J$3:$K$7,2,0),""),"")
Which, as you can see, is never going to work in a standard formula.
Is there a way to transfer the above block into VBA? I have tried a standard copy and paste, removing the "=" but it just Churns out an error which I don't understand.
I would need the result to be put into column T starting at row 4, since this will be used for multiple rows (starting at T4 and going all the way down to T200)
Since i am already begging for a lot of help as well, could this be put into a command button that will be at the top of the spreadsheet, to save me running the macro every time, I can just press the button...yes it's lazy.
and finally, I promise, is there a way to remove the #N/A result from the cell? as it is rather annoying and clutters up the screen unnecessarily.
I apologise if this seems like a rather complex thing, I would have been fine if it was just the one line but since the IF statement needs to cover multiple variables it is well outside my understanding.
Also, apologies if my explanation of what I require is both long winded and a little confusing, missed any vital information, or it just doesn't make sense.
Thank you so much in advance for any help
Apologies if this explanation is a little long winded but I want to make sure I cover everything in one go.
I am currently using this:
=IF(H4="EUM",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$A$3:$B$7,2,0),""),"")
to return a result in Cell T4. This works fine for one particular instance but the issue I have is that Cell H4 has 3 different values (its a drop down format) and Cell I4 also has 2, again in drop down format. Depending on what is in Cells H4 & I4 would depend on which Vlookup to use, as the values to be returned would be different for each.
Assuming you are following me so far, this is going to be IMPOSSIBLE using a standard formula, as basically the nesting wont allow me to use that many IF's.
The total number of IF statements, covering everything is:
=IF(H4="EUM",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$A$3:$B$7,2,0),""),"")
=IF(H4="EUM",IF(I4="WARM LEAD",VLOOKUP(J4,Sheet3!$D$3:$E$7,2,0),""),"")
=IF(H4="W/SPACE",IF(I4="WARM LEAD",VLOOKUP(J4,Sheet3!$A$11:$B$15,2,0),""),"")
=IF(H4="W/SPACE",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$D$11:$E$15,2,0),""),"")
=IF(H4="A&M",IF(I4="WARM LEAD",VLOOKUP(J4,Sheet3!$G$3:$H$7,2,0),""),"")
=IF(H4="A&M",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$J$3:$K$7,2,0),""),"")
Which, as you can see, is never going to work in a standard formula.
Is there a way to transfer the above block into VBA? I have tried a standard copy and paste, removing the "=" but it just Churns out an error which I don't understand.
I would need the result to be put into column T starting at row 4, since this will be used for multiple rows (starting at T4 and going all the way down to T200)
Since i am already begging for a lot of help as well, could this be put into a command button that will be at the top of the spreadsheet, to save me running the macro every time, I can just press the button...yes it's lazy.
and finally, I promise, is there a way to remove the #N/A result from the cell? as it is rather annoying and clutters up the screen unnecessarily.
I apologise if this seems like a rather complex thing, I would have been fine if it was just the one line but since the IF statement needs to cover multiple variables it is well outside my understanding.
Also, apologies if my explanation of what I require is both long winded and a little confusing, missed any vital information, or it just doesn't make sense.
Thank you so much in advance for any help