IF CONDITIONS

stantheman007

New Member
Joined
Feb 1, 2021
Messages
18
Office Version
  1. 365
Platform
  1. MacOS
hey everyone,

I am trying to make a formula that outputs a value of 1 when some conditions hold, and 0 when they don't. Here is what I have tried: {=IF(($A$2:$A$991=$A3)*($M$2:$M$991=$M3)*($P$2:$P$991=$P3)*((0.95*$R3)<$R3<(1.05*$R3)), "1", "0")}

The inequalities are for one of the conditions; that the value in R column be between +/- 5% of the highlighted value.

Excel only outputs 0s in this formula, even though I am sure that there should be 1s somewhere.

Any help on this would be great.

Stan
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
The other terms seem straight forward (do the values in columns A,M and P match those of the current row 3).
But the next term in your formula puzzles me. In words, what do you mean by this term ((0.95*$R3)<$R3<(1.05*$R3)) ?
 
Upvote 0
The other terms seem straight forward (do the values in columns A,M and P match those of the current row 3).
But the next term in your formula puzzles me. In words, what do you mean by this term ((0.95*$R3)<$R3<(1.05*$R3)) ?
So I want Excel to check the R column (R2:R991) and if others values are within 5% of R3 (R4, R5...), as well as if the A,M P conditions hold, then to output a value of 1. Does this make more sense, I subsequently tried {=IF(AND(($A$2:$A$991=A3), ($M$2:$M$991=M3), ($P$2:$P$991=P3), ($R$2:$R$991= (0.95*R3)<R3<(1.05*R3))), "1", "0")} but it still outputted only 0s...

Thanks!
 
Upvote 0
The other terms seem straight forward (do the values in columns A,M and P match those of the current row 3).
But the next term in your formula puzzles me. In words, what do you mean by this term ((0.95*$R3)<$R3<(1.05*$R3)) ?
Also I should say that M and P columns output text
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,388
Members
448,957
Latest member
Hat4Life

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