formuls using 2003 version

B

Beth

hi new to posts!
Is there a formula to copy row from worksheet to another in the same
workbook? I have a price list in one work sheet that allows the user to
enter a qty of items in each row. I want to be able to print a summary page
of only the items selected or where a quantity was entered. The current
worksheet contain over 100 items and sometimes only one or two items is
selected.
Thanks for help!
beth
 
G

Gary''s Student

It is easier to copy the rows and then remove the blanks. Say sheet1 has the
items in row 1 and the quantity in row 2 and we want to copy this to sheet2,
but only the non-empty quatities:

Sub another()
Sheets("Sheet1").Range("A1:IV2").Copy Sheets("Sheet2").Range("A1")
Sheets("Sheet2").Activate
n = Columns.Count
For i = n To 1 Step -1
If IsEmpty(Cells(2, i)) Then
Range(Cells(1, i), Cells(2, i)).Delete shift:=xlToLeft
End If
Next
End Sub
 
B

Beth

Thanks Gary for your response.
I understand the concept. But I'm an excel novice and it will take me some
time to go through the formula. I'm not sure how to set it up but I'll try.
I'm thinking - say sheet 1 has 10 rows. My user only inputs a value in a
cell on 2 rows. The formula is set up so that the entire sheet comes over to
sheet 2 but it disregards the blanks or 8 rows and copies the 2 rows right?
That's what your saying right?

Thanks!
Beth
 

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

Top