I am trying to write a formula where if there is no information in the first column, then look to the next column to see if there is anything there, if something is found then execute the formula. I have managed to get it working for two columns, however not sure if that is the limitations with the formula I'm using. I'm using Index/Match/Match to lookup from the table below. So if there is nothing in L, then move on to N etc. I started in U and have managed to get U and V working, however can't get any more.
Capture.PNG
It's quite a complex spreadsheet, however what it's saying is that if there is a yes (or y) in columns I or J, then start looking at column U and match the amount . If that combination is found in the table on the next sheet, bring back the amount and multiply it by figures I have in columns E & X. If no data in column U then move on to column V.
This is the lookup table in Sheet 2:
Capture2.PNG
...and the formula I have so far:
=IFERROR(IF(OR(I11="y",J11="y"),INDEX('Sheet2'!C42:N56,MATCH(U11,'Sheet2'!B42:B56,0),MATCH('Sheet1'!U2,'Sheet2'!C41:N41,0))*E11*X11,IF(AND(I11="n",J11="n"),INDEX('Sheet2'!C23:N37,MATCH(U11,'Sheet2'!B23:B37,0),MATCH('Sheet1'!U2,'Sheet2'!C22:N22,0))*E11*X11)),IF(OR(I11="y",J11="y"),INDEX('Sheet2'!C42:N56,MATCH(V11,'Sheet2'!B42:B56,0),MATCH('Sheet1'!V2,'Sheet2'!C41:N41,0))*E11*X11,IF(AND(I11="n",J11="n"),INDEX('Sheet2'!C23:N37,MATCH(V11,'Sheet2'!B23:B37,0),MATCH('Sheet1'!V2,'Sheet2'!C22:N22,0))*E11*X11)))
Apologies if this does not make any sense whatsoever, however any help would be appreciated.
Bookmarks