if + sign

kelvin_9

Active Member
Joined
Mar 6, 2015
Messages
460
Office Version
  1. 2019
Hi All,

i was thinking if i can use "if+sign" to return positive and negative value at column N?
thanks for the advice

hotel stroller demo 1.1.xlsx
HIJKLMN
53opening quantityrental quantitynet balancereturn quantityclosing quantityvariance
5410191100
55102819-1
56936511-1
DLH
Cell Formulas
RangeFormula
H55:H56H55=IF(P54="","",IF(P54="no",L54,IF(OR(O54="/"),10,IF(AND(P54="yes",O54="park to hotel"),(L54-N54),IF(AND(P54="yes",O54="return to park"),(L54+N54))))))
J54J54=H54-I54
J55:J56J55=IFERROR(H55-I55,"")
L54L54=H54-I54+K54
L55:L56L55=IFERROR(H55-I55+K55,"")
N54:N56N54=IF(L54=10,0,IF(L54>10,(10-(L54)),((L54)-10)))
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I'm clearly missing something obvious, but doesn't =L54-10 give you what you're looking for?
 
Upvote 0
I'm clearly missing something obvious, but doesn't =L54-10 give you what you're looking for?
thanks for your reply kevin9999

cell N54, correct, 0
cell N55, correct, -1
but N56 is not correct, if L56 not 10, 10-L56, which should +1
 
Upvote 0
Book1
LMN
1closing quantityvariance
2100
39-1
411+1
Sheet1
Cell Formulas
RangeFormula
N2:N4N2=L2-10
 
Upvote 0
Book1
LMN
1closing quantityvariance
2100
39-1
411+1
Sheet1
Cell Formulas
RangeFormula
N2:N4N2=L2-10
thank you very much for your reply kevin9999

looks fine for my formula, but seems strange
how should i amend it(one more if?) to trigger positive value or using if+sign can be sloved?

hotel stroller demo 1.1.xlsx
LMN
53closing quantityvariance
DLH

hotel stroller demo 1.1.xlsx
LMN
559-1
5611-1
DLH
Cell Formulas
RangeFormula
L55:L56L55=IFERROR(H55-I55+K55,"")
N55:N56N55=IF(L55=10,0,IF(L55>10,(10-(L55)),((L55)-10)))
 
Upvote 0
I am struggling to understand why you don't just use the (very) simple formula I showed you in post #6? If it doesn't give you the correct answer, then I just don't understand what your correct answer is...
 
Upvote 0
I am struggling to understand why you don't just use the (very) simple formula I showed you in post #6? If it doesn't give you the correct answer, then I just don't understand what your correct answer is...
thank you very much for your reply, kevin9999

your answer is great, but i have multiple query like below workbook
excel multiple if statments

thanks in advance
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

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