View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default Nested IF problem - help please

How about a MATCH with an OFFSET:
The match part will convert the month to a number.
Ex:
=MATCH("Oct",{"Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec"},0) returns 1 through 12, indicating which month was selected.
Then the OFFSET can move you over that many columns from a reference cell.
Ex:
=offset(A10,0,match($B$2,{"Jan","Feb","Mar","Apr", "May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"},0 ))
This figures out what month you're looking at, and moves right that many
columns from the reference cell, a10 in this case.
--Bruce

"Dasin" wrote:

Our spreadsheet pulls values from a column when a month is inserted in
a certain cell:

OCT is typed in B2 and in the column below it, from B10 down to B286,
data (numbers) are pulled from the October column K10 through K286
using =IF($B$2="Oct",K10,IF(and so on for each month). IF Nov is typed
in B2 then the same happens except data is pulled from the November
column, L. The monthly columns from K through V are tied to and updated
from other sheets. As you can see the problem is that nested functions
allow only 7 and I need 12, one for each month. I have looked at the
VLOOPUP and the HLOOKUP but our data is not set up that way (tables)
since they need to be exact numbers pulled from the monthly columns
that are tied to other sheets.
OCT (B2)

OCT NOV DEC
Complaint 3 (B10) 3
6
Inspection 10 (B11)
10 2
NOV 11 (etc)
11 5
Door Notice 1 and
so on
Recheck 32
Citation 2
Work Order 0
Demolition 0

Don't know if when this is posted it will line up OK.

Any help appreciated.

Thanks,

James