if statement for +/- a percentage

marshy3300

Board Regular
Joined
Aug 17, 2014
Messages
59
Hello, I'm trying to display a tick or cross in F if a variance (D-C) is less than or greater than C but i'm having a total mind blank. Should be easy but its not!
I've got the wingdings side easily just the formula is stuffing me around

So

Num1 ...Num2 ...Variance.....Mark
C.............D............E...........F
600 ......600............0........Tick
13 ........14 ............1........Cross
312 ......308 ..........-4 ........Tick
312 ......388 ..........86 .......Cross
312 ......333...........21.........Tick
 
Last edited:

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

marshy3300

Board Regular
Joined
Aug 17, 2014
Messages
59
86 (though my math sucks and should be 76) is greater than 10% of 312 so its a cross
21 is within the +/- 10% mark

Really bad day..... This is all based off +/- 10% variance from C
 
Last edited:

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
18,938
Office Version
2013
Platform
Windows
So this

Code:
=IF(ABS(E1)< ABS(C1*0.1),CHAR(252),CHAR(251))
 
Last edited:

marshy3300

Board Regular
Joined
Aug 17, 2014
Messages
59
Thanks Michael,

Looks like that only works if the variance is 0. Otherwise all the examples show wrong though the symbol does change over the course of the sheet
*
Amended - Wrong cell references... Works a treat
Thanks heaps
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,101,814
Messages
5,483,073
Members
407,376
Latest member
stan vacek

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top