Forum Discussion
shannonbieniekpfgc
Mar 23, 2023Copper Contributor
formula
Trying to put in a formula if column d says sell then column f will be a negative amount dsflajsd adslknfad; lkadf;k BUY dfd $ 350.00 lkdsf...
shannonbieniekpfgc
Mar 23, 2023Copper Contributor
So I did the formula and got this
BUY dfd $350.00 350
SELL dfd $ 10.00 #VALUE!
BUY dffew $ 25.50 $ 25.50
SELL ere $ 9.00 #VALUE!
BUY dfd $350.00 350
SELL dfd $ 10.00 #VALUE!
BUY dffew $ 25.50 $ 25.50
SELL ere $ 9.00 #VALUE!
NikolinoDE
Mar 23, 2023Platinum Contributor
I see that you have some #VALUE! errors in your results.
This usually means that Excel cannot perform the calculation because of a mismatch in data types. For example, if you have text or blank cells in column F instead of numbers, Excel will not be able to multiply them by -1.
To fix this, make sure that all the cells in column F have valid numeric values.
You can also use the ISNUMBER function to check if a cell contains a number or not.
For example, you can use this formula: =IF(AND(D2=“SELL”,ISNUMBER(F2)),-F2,F2).
This means that if the value in column D is “SELL” and the value in column F is a number, then the value in column F will be negative, otherwise it will be positive.
This usually means that Excel cannot perform the calculation because of a mismatch in data types. For example, if you have text or blank cells in column F instead of numbers, Excel will not be able to multiply them by -1.
To fix this, make sure that all the cells in column F have valid numeric values.
You can also use the ISNUMBER function to check if a cell contains a number or not.
For example, you can use this formula: =IF(AND(D2=“SELL”,ISNUMBER(F2)),-F2,F2).
This means that if the value in column D is “SELL” and the value in column F is a number, then the value in column F will be negative, otherwise it will be positive.