Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
display cell only if it contains a value
Hi,
I am trying to make an invoice template where rows are used to display name of product, price etc. The invoice size should automatically be small if there are only few rows. In other words, there should not be any blank rows displayed when there is no item. I should not manually hide blank spaces, but rather want the invoice to shrink to the number of used rows containing positive values and not even "" values that may be embedded in formulas. Regards sai |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
display cell only if it contains a value
Assign to a button or shape. Based on column A having values
Sub FilterforInvoice() lr = Cells(Rows.Count, "a").End(xlUp).Row With Range("a1:a" & lr) If ActiveSheet.FilterMode Then .AutoFilter Else .AutoFilter Field:=1, Criteria1:="0", visibleDropDown:=False ActiveSheet.PrintPreview End If End With End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Sai Krishna" wrote in message ... Hi, I am trying to make an invoice template where rows are used to display name of product, price etc. The invoice size should automatically be small if there are only few rows. In other words, there should not be any blank rows displayed when there is no item. I should not manually hide blank spaces, but rather want the invoice to shrink to the number of used rows containing positive values and not even "" values that may be embedded in formulas. Regards sai |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find last cell in range with data, display cell address | Excel Worksheet Functions | |||
display text in one cell as a number in an adjacent cell in excel | New Users to Excel | |||
Display contents of cell in another cell as part of text string? | New Users to Excel | |||
Conditional display - IF cell is blank, display next used row! | Excel Programming | |||
Shortcut key to display change the display from displaying cell values to cell formulae | Excel Programming |