Nested IF Formula returning wrong result?

HCANNI819

New Member
Joined
Jul 8, 2024
Messages
3
Office Version
  1. 2021
Platform
  1. Windows
Afternoon All, I hope you can help.

I'm trying to automate the posting of data which requires different information in one field (in this case the Tender), based upon what range of numbers the Job No falls within.

As you can see from the below, I'm trying to get D4 to provide the result of PRE08.
I have tried using a Nested IF formula, but despite the Job No being <205000, it is returning the X for no match instead of the PRE08 as expected. I've had a play with cell formatting on the 204007 cell but it still isn't making any difference.

1720452749461.png

Any advice would be greatly appreciated as it's frustrating me!

Thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Are your Job No's numbers stored as text? That may be the issue.
 
Upvote 0
Agree, job number looks like text.
If that is how your data needs to be then maybe try
Excel Formula:
=IF(N(C4)<200000,"PRE09",IF(N(C4)<205000,"PRE08",IF(N(C4)<206000,"LAB02","X")))
 
Upvote 0
Thanks both - I had changed it to Number on this tab, but it was coming through from another tab formatted as Text.

@Snakehips - out of interest what does the (N do on that formula?
 
Upvote 0
It coverts the text number to a number as for as the formula is concerned.
Similarly you could use
Excel Formula:
=IF(--C4<200000,"PRE09",IF(--C4<205000,"PRE08",IF(--C4<206000,"LAB02","X")))
or
Excel Formula:
=IF(1*C4<200000,"PRE09",IF(1*C4<205000,"PRE08",IF(1*C4<206000,"LAB02","X")))
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top