Reputation: 505
I am trying to hide specifics cells based on the value of another cell. So far I manage to hide the entire row but is not able to hide specific cells.
Local Currency value show/hide item
If Range("Currency").Value = "USD" Then
Range("LocalCurAmount").EntireRow.Hidden = True
End If
So far I have tried
Range("LocalCurAmount").Hidden = True
Range("LocalCurAmount").Cells.Hidden = True
But nothing works. I would like to hide this specific cells and move the content up.
LocalCurAmount is a single cell and I would also like to apply the same context to a merged area including multiple cells.
Upvotes: 0
Views: 368
Reputation: 1577
You can only hide a full row or full column, you can not hide individual cells, you can only delete them, if you delete a range, you can move cells up or left from the sides
in order to delete; this statement can be used
Range("LocalCurAmount").Delete Shift:=xlUp
Upvotes: 2