# Nested If Statements

#### pamhurst

##### New Member
I have 4 worksheets in 1 workbook and I'm trying to do a comparison. I'm providing information to a buyer on items they need to take action on. My first statement goes something like this:

=IF('EFA WK1'!H5 <> 'EFA WK2'!G5, "CHECK!", 0) which works fine.

Now I want to add another statement that basically states If 'Comparison'!H2 is less than or greater than 25% put the CHECK. So far I haven't been able to get it to work.

Any help would be great!!!!

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

#### Zack Barresse

##### MrExcel MVP
without any other specifics...

=IF(or('EFA WK1'!H5,'Comparison'!H2) <> 'EFA WK2'!G5, "CHECK!", 0)

because you didn't specify wether it should be, check one first, then the other, both conditions be met, or just one condition be met.

if they both need met, switch 'or' for 'and'

HTH

#### AlohaJulio

##### Board Regular
=iIF(or('EFA WK1'!H5<>'EFA WK2'!G5,'Comparison'!H2<=0.25, "CHECK!", 0)

#### pamhurst

##### New Member
See if this makes more sense....First I was just giving a heads up notice that there was a difference between week 1 and week 2. I even have a sheet showing the differences. Now the buyer wants a notice only when there is a difference of + or - of 25%. So I'm not even sure what is the best formula to use.

Thanks for any help.

#### Zack Barresse

##### MrExcel MVP

okay, what do you have in...

EFA WK1!H5
EFA WK2!G5
Comparison!H2
??

and do you still want to know if either EFA WK1!H5 or Comparison!H2 is +/- 25% of EFA WK2!G5?

or one or the other?

#### pamhurst

##### New Member
What I have in EFA WK1 H5 is a number same for EFA WK2 G5. Comparison H2 is the difference between EFA WK1 H5 and EFA WK2. So I would like to give a heads up notice when the difference is + or - 25%.

Thanks,

Pamala

#### Zack Barresse

##### MrExcel MVP

well if you only want to look at the Comparison!H2, either conditionally format it for same cell options

or

in another cell type something like this...

#### Brian from Maui

##### MrExcel MVP
pamhurst said:
What I have in EFA WK1 H5 is a number same for EFA WK2 G5. Comparison H2 is the difference between EFA WK1 H5 and EFA WK2. So I would like to give a heads up notice when the difference is + or - 25%.

Thanks,

Pamala

In Comparison H2 why not use Conditional Formatting if the number exceeds your criteria

##### MrExcel MVP
pamhurst said:
What I have in EFA WK1 H5 is a number same for EFA WK2 G5. Comparison H2 is the difference between EFA WK1 H5 and EFA WK2. So I would like to give a heads up notice when the difference is + or - 25%.

Thanks,

Pamala

Are you saying that H2 on sheet Comparison houses 25%?

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,167,961
Messages
5,856,531
Members
431,819
Latest member
Tori Murphy

### 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.

### Which adblocker are you using?

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

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