Above or Below Target

Dans Issues

New Member
Joined
Jan 6, 2022
Messages
16
Office Version
  1. 2010
Platform
  1. Windows
Hi All,

I was hoping that some one could help with a formular.
Situation:
Each month a delivery target is set, this information is in the same work book but in a different tab.
Question one
How can I write a formula that doesn't show a negative if the target is over delivered (='Raw Delivery Data'!B46-D4) i.e. Target 1000 and delivered Equal to or grater than?. If under delivered the formula needs to be a negative red i.e. Target 1000 Delivered 900? I think the formula I'm writing is incorrect

Question Two:

In the percentage Loss or Gain how can I illustrate a percentage? ie... 40% under target (red) or 40% above target?

I'm a First time user on this site and I'm using excel more and more each day so I think I'm going to become a regular here
Thank you for your help


A monthB Target C Accrual Delivery D Plus or minusE Percentage loss or gain (%)
January30001100??
February21003330??
March22301100??
April88021100??
May33301100??
June22104450??
July36541100??
August25411100??
September25691100??
October65288809??
November12451100??
December36871100??
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
C2-B2

will give a - for under delivered and positive for over delivered
is that the results you expected

you can the use conditional formatting for colour quite easy - but i can explain that - if the below is correct

the percent - is that the amount missing / target
ie target 100 delivered 25

so missing 75

so either -75% = missing / target = 75/100
or delivered 25

25/100. = 25%

Book5
ABCDE
1A monthB TargetC Accrual DeliveryD Plus or minusE Percentage loss or gain (%)
2January30001100-190063%
3February21003330123059%
4March22301100-113051%
5April88021100-770288%
6May33301100-223067%
7June221044502240101%
8July36541100-255470%
9August25411100-144157%
10September25691100-146957%
11October65288809228135%
12November12451100-14512%
13December36871100-258770%
Sheet1
Cell Formulas
RangeFormula
D2:D13D2=C2-B2
E2:E13E2=ABS(D2/B2)
 
Upvote 0
Thanks for replying so quickly ETAF,

So how can I use conditional formatting to highlight in Red the negatives (Below delivery target) in column D and the below delivery target percentages in column E?

Thanks for the help
 
Upvote 0
If my example is the % OK,

as i did ask for clarification
the percent - is that the amount missing / target
ie target 100 delivered 25

so missing 75

so either -75% = missing / target = 75/100
or delivered 25

25/100. = 25%

what is the correct % you want to show ?


I have changed the % to show the + or - , then you can see the out of target %
as its the difference in target

then anything in column D that is negative ie below 0 will need formatting
then anything in column E that is negative ie below 0% will need formatting

you need 2 rules , 1 for D and 1 for E for different colours
But you could apply just 1 rule if you want the same colour for both - as a negative in D will also include a % that needs highlighting


Select the range in D, you want to format - say D2 to D100

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
D2:D100 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=D2 < 0

Format [Number, Font, Border, Fill]. Fill to the colour you want
choose the format you would like to apply when the condition is true
OK >> OK

Now add another rule
Select the range for E - say E2:E100
Formula
=E2 < 0
apply the format
2 rules

Book5
ABCDE
1A monthB TargetC Accrual DeliveryD Plus or minusE Percentage loss or gain (%)
2January30001100-1900-63%
3February21003330123059%
4March22301100-1130-51%
5April88021100-7702-88%
6May33301100-2230-67%
7June221044502240101%
8July36541100-2554-70%
9August25411100-1441-57%
10September25691100-1469-57%
11October65288809228135%
12November12451100-145-12%
13December36871100-2587-70%
Sheet1
Cell Formulas
RangeFormula
D2:D13D2=C2-B2
E2:E13E2=(D2/B2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E13Expression=E2<0textNO
D2:D13Expression=D2<0textNO



JUST 1 RULE same colour
you could also go back to showing positive % for the error if needed
BUT check the % is what you want and expected

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
D2:E100 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=$D2 > 0

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK

Book5
ABCDEF
1A monthB TargetC Accrual DeliveryD Plus or minusE Percentage loss or gain (%)
2January30001100-1900-63%
3February21003330123059%
4March22301100-1130-51%
5April88021100-7702-88%
6May33301100-2230-67%
7June221044502240101%
8July36541100-2554-70%
9August25411100-1441-57%
10September25691100-1469-57%
11October65288809228135%
12November12451100-145-12%
13December36871100-2587-70%
Sheet1
Cell Formulas
RangeFormula
D2:D13D2=C2-B2
E2:E13E2=(D2/B2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:E13Expression=$D2<0textNO


This is using 1 colour conditional formatting the 2 columns based on a positive r negative in D
and using an ABS() again for the % so it stays positive
Book5
ABCDEF
1A monthB TargetC Accrual DeliveryD Plus or minusE Percentage loss or gain (%)
2January30001100-190063%
3February21003330123059%
4March22301100-113051%
5April88021100-770288%
6May33301100-223067%
7June221044502240101%
8July36541100-255470%
9August25411100-144157%
10September25691100-146957%
11October65288809228135%
12November12451100-14512%
13December36871100-258770%
Sheet1
Cell Formulas
RangeFormula
D2:D13D2=C2-B2
E2:E13E2=ABS(D2/B2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:E13Expression=$D2<0textNO
 
Upvote 0
Solution
Hi ETAF,

The correct percentage I was wanting to show was all deliveries above target. You have illustrated this in all of your examples.

Thank you for you time and experience, I'm sure I will hear from you again when I have other issues.

Regards

"Dan's Issues"
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

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