ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   formuls using 2003 version (https://www.excelbanter.com/excel-programming/424471-formuls-using-2003-version.html)

Beth

formuls using 2003 version
 
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

Gary''s Student

formuls using 2003 version
 
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

--
Gary''s Student - gsnu200835


"Beth" wrote:

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


Beth

formuls using 2003 version
 
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


"Gary''s Student" wrote:

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

--
Gary''s Student - gsnu200835


"Beth" wrote:

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



All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com