Print rows with special value only

  • Thread starter Thread starter STIG
  • Start date Start date
S

STIG

I have a table with many rows. I place quantity in one column for few rows.
How can I have ONLY the rows with quantity printed?
 
supposing you have your quantities in column "A" (cells(cnt1,1)):

sub deletingrows()
dim cnt1 as integer
for cnt=1 to 100 'or put the number of rows
if cells(cnt1,1)=empty then 'for column "B":cells(cnt1,2) or for "C":
cells(cnt1,3)
rows(cnt1).delete
cnt1=cnt1-1
end if
next
end sub

other way is doing it with the sort command (Data-->Sort) .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top