ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   need to make cell blank if no data in previous cell (https://www.excelbanter.com/excel-programming/398735-need-make-cell-blank-if-no-data-previous-cell.html)

Franky

need to make cell blank if no data in previous cell
 
I have a data in columns, I want data to be shown only if there is
data in that row if no data then leave it blank (here is what I am
asking for)


Stock trade Gain/Loss Gain/Loss for all
trades xxxx xxxx xxxxx
abc 4.18% 4.18%
def 3.77%
7.95%
[no trade] N/A 7.95%
[no trade] N/A 7.95%
i want trade column to appear blaink in cell of gain/loss for all
trade instead of showing 7.95%.


If there is no data but the formula is in column, third line shows
7.95%, 4th line shows 7.95%, 5th line 7.95% and this is keep going as
there is formula there. I want to to make if there is no data in GAIN/
LOSS column then GAIN/LOSS FOR ALL TRADES to appear blank.


Bill Renaud

need to make cell blank if no data in previous cell
 
Use the IsBlank() worksheet function in your formula.
(This does not require VBA programming, so these types of questions
could/should be posted in the Worksheet.Functions newsgroup.)

For example, if cell A2 is blank, then cell B2 would have the formula:
=IF(ISBLANK(A2),"",YourFormulaHere)

or

=IF(ISBLANK(A2),0,YourFormulaHere), with column $B formatted not to show
values if they are 0.
--
Regards,
Bill Renaud





All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com