excel formula Help with value great than then include value with negative

Lukma

Board Regular
Joined
Feb 12, 2020
Messages
240
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi Guys

i was wondering if its possible to have a two value display negative sign on another cell

am having a Value in Colum A 1 = 6 and in Cell A2 = 8, without any negative sign, what am trying to achieve is that in Column B1 and 2 beside each other i need if A2 is greater than A1 if yes the it should return Cell A2 as -8 and if not then to remain same.

Is there any solution formula that could get this done

Appreciate if there is

Hrs
6
8Greater Than A2-8
If Not greater than8
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi Lukma,

Please check below:

Excel Formula:
=IF(A2>A1,0-A2,A2)

imagecontrol.xlsm
AB
16
28-8
Sheet3
Cell Formulas
RangeFormula
B2B2=IF(A2>A1,0-A2,A2)
 
Upvote 0
Solution
Hi Saurabhj

Awesome just as i needed, i have been trying to figure it out :ROFLMAO:(y):cool: so much cool

Thanks
 
Upvote 0

Saurabhj


Can this formal work out on Time Format

ILSP KPI Performance Tracking.xlsx
JKL
3ADOF Operation Downtime 9:35
4ADL&S Operation Downtime 5:21
5Supplier Ex-trailer Downtime 67:49
ILSP_KPI_Tracking_Data_Entry
Cell Formulas
RangeFormula
L3L3=IFERROR(AVERAGEIF(E10:E14,">0"),"")
L4L4=AVERAGEIFS(DZ18:DZ60000,DF18:DF60000,B9,DZ18:DZ60000,">0")
L5L5=SUMIFS($EB$18:$EB$60000,$DF$18:$DF$60000,$B$9)
 
Upvote 0
Hi Lukma,

Thanks for the feedback.

Can you please explain your query.
What is the expected output?
L5 is showing 67:49, is this indicating time ?

Thanks,
Saurabh
 
Upvote 0
Saurabhj

Thanks for your feedback i actually need the output of L3 and L4 only
that means if L3 is greater than L4 then L3 should return same time but with a negative sign

i tried using same formula but cant seems to find my way around it with time format

9:25​
-9:25
5:21​
 
Upvote 0
Hi Lukma,

Use below:

Excel Formula:
=IF(L3>L4,L3*-1,L3)

And select check box "Use 1904 date System" in Excel Options (File -> Options).
(See screenshot)
 

Attachments

  • Use1904DateSystem.JPG
    Use1904DateSystem.JPG
    62.6 KB · Views: 8
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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