hide cell value if another cell is blank

annadinesh

Board Regular
Joined
Mar 1, 2017
Messages
123
Office Version
  1. 2019
Platform
  1. Windows
i want that

the cell value on Range B6:B30 should show as per the value of D6:D30

like if a cell (D16-contains formula) is blank then the cell value of same Row i.e. (B16-contains formula) will hide before click Whatsapp Button


and so on..

using EXCEL 2019



Cell Formulas
RangeFormula
G3G3=TODAY()
F6:F21F6=PMS!A31
G6:G21G6=IF(H6,HLOOKUP($D$3,PMS!$A$3:$AD$50,ROWS($2:29)+1,0)*1.18,"")
B6:B29B6=PMS!A4
D6:D29D6=IF(E6,HLOOKUP($D$3,PMS!$A$3:$AD$50,ROWS($2:2)+1,0)*C6,"")
D32D32=SUM(D6:D29)
G32G32=SUM(G6:G30)
F33F33=D32+G32
Named Ranges
NameRefers ToCells
MODELS=PMS!$A$3:$AD$3G6:G21, D6:D29
Quotation=Quotation!$B$2:$H$33G6:G21, D6:D29
Cells with Data Validation
CellAllowCriteria
D3:F3List=MODELS
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Two different ways:

1. Update formulas in cells B6:B29
If the formula in B6 is currently:
Excel Formula:
=PMS!A4
change it to:
Excel Formula:
=IF(D16="","",PMS!A4)
and copy down for all rows

2. Use Conditional Formatting on cells B6:B29
Select cells B6:B29, go to Conditional Formatting, choose the formula option and enter in this formula:
Excel Formula:
=$D6=""
and then you can choose the Format of white text, which will make the text in cell B16 blend in with the background and not be visible.
 
Upvote 0
Two different ways:

1. Update formulas in cells B6:B29
If the formula in B6 is currently:
Excel Formula:
=PMS!A4
change it to:
Excel Formula:
=IF(D16="","",PMS!A4)
and copy down for all rows

2. Use Conditional Formatting on cells B6:B29
Select cells B6:B29, go to Conditional Formatting, choose the formula option and enter in this formula:
Excel Formula:
=$D6=""
and then you can choose the Format of white text, which will make the text in cell B16 blend in with the background and not be visible.
Thanks for the reply, but i want the value of B6:B30 should hide before pressing Whatsapp Button if cell value of D6:D30 is blank
 
Upvote 0
What do you mean by "hide"?
Do you mean hide the whole row, or just make it so the value in column B is not visible?

Note that you CANNOT physically hide column B without hiding the entire row (meaning ALL columns in that row will be hidden).
You can only hide entire rows in Excel, not just certain columns!

Also, in order to hide rows, you would either need to use Filters or VBA. You cannot hide rows just by using formulas.
 
Upvote 0
What do you mean by "hide"?
Do you mean hide the whole row, or just make it so the value in column B is not visible?

Note that you CANNOT physically hide column B without hiding the entire row (meaning ALL columns in that row will be hidden).
You can only hide entire rows in Excel, not just certain columns!

Also, in order to hide rows, you would either need to use Filters or VBA. You cannot hide rows just by using formulas.
Only cell Value of B6:B30 if cell value of same row of D6:D30 is Blank
 
Upvote 0
Only cell Value of B6:B30 if cell value of same row of D6:D30 is Blank
It is still not entirely clear what you mean by that.
Let's work from an example. Let's say that cell D9 is blank.
So which of the two following options do you want?

Option 1:
Just blank out the value in cell B9, i.e.
1718884688532.png


Option 2:
Hide row 9, i.e.
1718884862594.png


The potential issue with the second option is there is no way to hide just column B and not columns F and H also.
You cannot hide just certain columns in Excel, it is hide the whole row, or nothing at all!
So, "Engine Dressing" would also be hidden, even though it is not zero!
 
Upvote 0
It is still not entirely clear what you mean by that.
Let's work from an example. Let's say that cell D9 is blank.
So which of the two following options do you want?

Option 1:
Just blank out the value in cell B9, i.e.
View attachment 112981

Option 2:
Hide row 9, i.e.
View attachment 112984

The potential issue with the second option is there is no way to hide just column B and not columns F and H also.
You cannot hide just certain columns in Excel, it is hide the whole row, or nothing at all!
So, "Engine Dressing" would also be hidden, even though it is not zero!
Its Like Option 1

if there is no value on D9 then the Value of B9 should hide but only before we click on a command button

like as per my sheet there is value on D6 to D16 and D17 to D30 are Blank, we need only the value of B17 to B30 should hide not row and so on
if D17to D30 have value then the value of B17 to B30 should show.
 
Upvote 0
if there is no value on D9 then the Value of B9 should hide but only before we click on a command button
So, are you saying that BEFORE you click the command button, those values should be hidden, but AFTER you click it, the should be visible?
Is it possible that the button will ever be clicked more than once per file? Even if the same file is re-opened the next day?
What should happen if they click it more than once?
 
Upvote 0
So, are you saying that BEFORE you click the command button, those values should be hidden, but AFTER you click it, the should be visible?
Is it possible that the button will ever be clicked more than once per file? Even if the same file is re-opened the next day?
What should happen if they click it more than once?
I am using 2 command buttons 1 is for sending whatsapp and another is for reset

so, if i click on whatsapp button then it should hide the value as mentioned above and when we click on reset button it return to the normal state
 
Upvote 0
I would recommend having your button update some unused cell on your sheet that is out of view, maybe something like AZ1. You could have button set it to “Hide”, and then the other button set it to “Unhide”.

Then you could use that in the formula I gave above, i.e.
=IF(AND(D16=“”,$AZ$1=“Hide”),””,PMS!A4)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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