Hi
Is it possible to have a nested ‘OR’ statement linked to a VLOOKUP statement? My worksheet has a row for entries between 1 Jan and 31 Dec. Each row has 18 cells of which 6 will contain an “A”,“M”, “N” or “O”. At the moment I have a nested “or” which works but only for one given date. I need to be able to input a date, eg in to cell B2 which then allows the nested “or” statement to work and retrieve the 6 cells for any day in the year. The nested statement I currently use is: =IF(OR(C18="M"),$C$17,IF(OR(G18="M"),$G$17,IF(OR(K18="M"),$K$17,IF(OR(O18="M"),$O$17,IF(OR(S18="M"),$S$17,IF(OR(W18="M"),$W$17,"")))))). This statement is searching row W for the unique occurrence of “M” and then returning the value of Row 17 above said unique occurrence.
I’ve tried adding a Vlookup to the beginning of this formula but Excel doesn’t seem happy with it – ie:
=VLOOKUP($B$2,B18:Z382,IF(OR(C18="M"),$C$17,IF(OR(G18="M"),$G$17,IF(OR(K18="M"),$K$17,IF(OR(O18="M"),$O$17,IF(OR(S18="M"),$S$17,IF(OR(W18="M"),$W$17,"")))))),)
If anyone can fathom what Im trying to do, can you let me know if its possible?
Many Thanks
Is it possible to have a nested ‘OR’ statement linked to a VLOOKUP statement? My worksheet has a row for entries between 1 Jan and 31 Dec. Each row has 18 cells of which 6 will contain an “A”,“M”, “N” or “O”. At the moment I have a nested “or” which works but only for one given date. I need to be able to input a date, eg in to cell B2 which then allows the nested “or” statement to work and retrieve the 6 cells for any day in the year. The nested statement I currently use is: =IF(OR(C18="M"),$C$17,IF(OR(G18="M"),$G$17,IF(OR(K18="M"),$K$17,IF(OR(O18="M"),$O$17,IF(OR(S18="M"),$S$17,IF(OR(W18="M"),$W$17,"")))))). This statement is searching row W for the unique occurrence of “M” and then returning the value of Row 17 above said unique occurrence.
I’ve tried adding a Vlookup to the beginning of this formula but Excel doesn’t seem happy with it – ie:
=VLOOKUP($B$2,B18:Z382,IF(OR(C18="M"),$C$17,IF(OR(G18="M"),$G$17,IF(OR(K18="M"),$K$17,IF(OR(O18="M"),$O$17,IF(OR(S18="M"),$S$17,IF(OR(W18="M"),$W$17,"")))))),)
If anyone can fathom what Im trying to do, can you let me know if its possible?
Many Thanks