Forum Discussion
Kylod
Mar 08, 2019Copper Contributor
Filling a cell on condition
Hi, I am creating a spreadsheet for work that calculates profit margin. I have a cell to enter the sell price for each unit. I also have 2 cells to enter multi buy eg. First cell input quantity,...
Twifoo
Mar 08, 2019Silver Contributor
I suggest that the labels in A1:F1 should be Qty, QtyforPrice, SaleQty, Price, UnitPrice, and TotalSale, respectively.
In C2, the formula is:
=IF(B2=“”,
A2,
—LEFT(B2,FIND(“ for $“,B2)-1))
In E2, the formula is:
=IF(B2=“”,
D2,
—RIGHT(B2,LEN(B2)-FIND(“ for $”,B2)-5))
In F2, the formula is:
=C2*E2
In C2, the formula is:
=IF(B2=“”,
A2,
—LEFT(B2,FIND(“ for $“,B2)-1))
In E2, the formula is:
=IF(B2=“”,
D2,
—RIGHT(B2,LEN(B2)-FIND(“ for $”,B2)-5))
In F2, the formula is:
=C2*E2