If function for positive and negative numbers

reesjonesrb

New Member
Joined
Apr 14, 2017
Messages
4
Hello,

I am trying to make a formula to look at the previous column, if it's a positive number it is to do one scenario, and if it's negative it needs to carry out another formula.

So in words - If A1 is less than 0, then answer is B1, if A1 is more than 0 then answer is (B1+(D1-C1))

Hope that makes some sense and look forward to your help. Thanks,
Barns
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Welcome to the forum.

Try:

=IF(A1<0,B1,B1+D1-C1)

Little puzzled though. You say you're looking at the previous column? You want to put this in B1? That would cause circular references.
 
Upvote 0
Does this work for you

=if(a1<0,b1,b1+(d1-c1))

dave
 
Upvote 0
Excellent, worked a treat thanks. I'm sure I'll be on here again over the next couple of days, writing a solar PV design spreadsheet and have lots of learning to do! Thanks for the prompt help!
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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