If function?

AyyJayEll

New Member
Joined
Nov 30, 2011
Messages
19
Please help- I am trying to use the if function for the following- I run reports that return a dollar value which can be either positive or negative. In a separate cell I’m trying to get it to. Look at the cell if it is a negative amount paste it either word profit. If it is positive paste with the word loss. - my attempt- =if(a1>0,”a1 Loss”,”a1 Profit”).
 

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 think you need to make it a1<0 or flip your "a1 loss"/"a1 Profit" labels around, either should work.
 
Upvote 0
Either way returns the same thing. Instead of cell value and either profit/loss it returns cell number profit/loss
 
Upvote 0
Anything enclosed in double-quotes is treated as literal text. So cell references need to be outside of the double-quotes and concatenated together with your literal text, i.e.
Code:
[COLOR=#333333]=if(a1>0,a1 & " Loss",a1 & " Profit")[/COLOR]
or
Code:
[COLOR=#333333]=a1 & if(a1>0," Loss"," Profit")[/COLOR]
 
Upvote 0
Hi,

I think may be you want this:


Book1
ABC
19999 Profit
2-15-15 Loss
Sheet58
Cell Formulas
RangeFormula
C1=IF(A1>0,A1&" Profit",A1&" Loss")


Switch the logic around if that's what you want (i.e. " Profit", " Loss")
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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