Thread: IF statement
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
RW RW is offline
external usenet poster
 
Posts: 49
Default IF statement

Gary,

Yes, it is possible.

Say your districts are A, B, C, D, E, their corresponding worksheets are
named likewise and B3 of each sheet contains the population.

On your main sheet, A1 contains the district.

To get the population (in say A3 of your main sheet) of the whatever
district is specified in A1, you need to put the following formula in A3:

=IF(A1="A",A!B3,IF(A1="B",B!B3,IF(A1="C",C!B3,IF(A 1="D",D!B3,IF(A1="E",E!B3)))))

Hope this helps,
Rosemary

"gbeard" wrote:

I have 6 different sheets in my workbook 1 for each of my 5 different
districts in my company and one main sheet. Is it possible to put the
district number in a cell on the main sheet and then reference that cell in
an IF statement to pull data from a particular district? By changing the
value in that single cell, I'd be able to find the same data from each of my
districts.
BTW, I can't use a VLOOKUP or HLOOKUP since the data I am trying to pull is
not in numerical order.

Any help or ideas would be appreciated,
Gary