PC Review


Reply
Thread Tools Rate Thread

display cell only if it contains a value

 
 
Sai Krishna
Guest
Posts: n/a
 
      28th Dec 2007
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 With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      28th Dec 2007
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
(E-Mail Removed)
"Sai Krishna" <(E-Mail Removed)> wrote in message
news:82A3FF41-3182-45EF-9D24-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need cell format to display 025349 as 02-5349 & display 1st zero msallen Microsoft Excel Crashes 3 5th Apr 2008 06:19 PM
find last cell in range with data, display cell address =?Utf-8?B?c2V2aTYx?= Microsoft Excel Worksheet Functions 14 29th Oct 2007 08:36 PM
Display contents of cell in another cell as part of text string? mschmidt@carolina.rr.com Microsoft Excel New Users 3 8th Jul 2006 07:44 PM
How to click on a cell and have the content of the cell display in a different cell marin_michael@yahoo.ca Microsoft Excel Worksheet Functions 0 6th Jun 2006 03:05 PM
Shortcut key to display change the display from displaying cell values to cell formulae =?Utf-8?B?QUEyZTcyRQ==?= Microsoft Excel Programming 3 14th Sep 2004 12:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:09 PM.