1. ## If statement reading incorrectly

I have a spreadsheet where cell b34 references cell g29 which contains an if function. My issue is that g29 is being read as containing all of the values in the if function, when I only want it read the value of the if statement iteself. Cell g29 contains the following information

=IF(G26=11,"530",
IF(G26=12,"590",
IF(G26=13,640,
IF(G26=14,690,
IF(G26=15,740,
IF(G26=16,790,
IF(G26=17,830,
IF(G26=18,870,
IF(G26=19,910,
IF(G26=20,950,
IF(G26=21,990,
IF(G26=22,1030,
IF(G26=23,1070,
IF(G26=24,1100,
IF(G26=25,1150,
IF(G26=26,1190,
IF(G26=27,1220,
IF(G26=28,1260,
IF(G26=29,1300,
IF(G26=30,1340,
IF(G26=31,1380,
IF(G26=32,1420,
IF(G26=33,1460,
IF(G26=34,1510,
IF(G26=35,1560,
IF(G26=36,1600,"0")
)))))))))))))))))))))))))

I want cell b34 to tell me if the value of cell g29 is greater than 1100. Currently it always reads yes because it's reviewing all of the information in cell g29 instead of just the true if statement whatever that happens to be. Any suggestions?

2. ## Re: If statement reading incorrectly

Hi LifeMeansChange

See the attached, might be of some help!

3. ## Re: If statement reading incorrectly

Thanks for the reply Kevin! Unfortunately, I'm not sure that this will help. I need to be able to input a number between 11 and 36 into cell g34 which determines what will be displayed in cell g29. I'm not familiar with tables and vlookup so could you explain how this may be able to help me out?

4. ## Re: If statement reading incorrectly

Hi LifeMeansChange

If you input a number between 11 & 36 into the green cell (G34) and then look at the value in the blue cell (G29). See the attached, the VLOOKUP is a lot shorter and easier to maintain.

5. ## Re: If statement reading incorrectly

Hi LifeMeansChange
It might be that Kevins suggestion is a satisfactory alternative, but there is no reason why your formula shouldn't work.
I think that there must be an error somewhere. Ive created a smaller one that seems to work OK.
Does G29 display a result (E.g. 530) or is it displaying the formula in the cell ? If the latter it might be that the cell is formatted to display text only.
I noticed that in your If statements the results are mostly numbers, but some string values. If you have other cells dependent upon the value returned in
G29 this might cause unexpected results.
As Ive done, create a smaller version with just a few nested IFs and get that working before adding to it.

HTH

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1