Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a work sheet where I am copying multiple worksheets
to, I would like to programatically do this, but unsure of how to have it look down Column A until it gets to the first Empty Cell and then paste. Was looking at the IsEmpty function but not sure that applies. I also would like to know how I can get the first empty cell in a column. A bit lost on this and I am sure it is very simple. something like Sheets("Sheet1").Cells(isempty) That is my wild guess. Any help would be appreciated. Wally Steadman |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
set rng = worksheets("Sheet1").cells(rows.count,1).End(xlup)
finds the last filled cell, so you can offset by 1 copy something Destination:=rng.offset(1,0) -- Regards, Tom Ogilvy "Wally Steadman" wrote in message ... I have a work sheet where I am copying multiple worksheets to, I would like to programatically do this, but unsure of how to have it look down Column A until it gets to the first Empty Cell and then paste. Was looking at the IsEmpty function but not sure that applies. I also would like to know how I can get the first empty cell in a column. A bit lost on this and I am sure it is very simple. something like Sheets("Sheet1").Cells(isempty) That is my wild guess. Any help would be appreciated. Wally Steadman |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
When I put the following code -- set rng = worksheets ("Sheet1").cells(rows.count,1).End(xlup) and let it run with a break in it so I could see values, the rows.count value was 65536 and I guess I was confused as to the last destination line you added. Could you possibly show an example using the following: Sheet 1 has the following: Column A only 1 A 2 B 3 C Sheet2 as the following: Column A only 1 Red 2 Green 3 Blue So after running the code, it would copy the cells from Column A and paste them below the 3 Blue in sheet2, so it would look like: 1 Red 2 Green 3 Blue 4 A 5 B 6 C I hope I was clear enough and really appreciate all the help you have given over the past few days. I am serving in Iraq and trying to work some tracking stuff that takes hours right now and get it down to a few minute process and with all the list help I am getting there slowly but surely. So thanks again Wally Steadman -----Original Message----- set rng = worksheets("Sheet1").cells(rows.count,1).End (xlup) finds the last filled cell, so you can offset by 1 copy something Destination:=rng.offset(1,0) -- Regards, Tom Ogilvy "Wally Steadman" wrote in message ... I have a work sheet where I am copying multiple worksheets to, I would like to programatically do this, but unsure of how to have it look down Column A until it gets to the first Empty Cell and then paste. Was looking at the IsEmpty function but not sure that applies. I also would like to know how I can get the first empty cell in a column. A bit lost on this and I am sure it is very simple. something like Sheets("Sheet1").Cells(isempty) That is my wild guess. Any help would be appreciated. Wally Steadman . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range
With Worksheets("sheet1") set rng = .Range(.Cells(1,1),.Cells(rows.count,1).end(xlup)) End with with Worksheets("Sheet2") rng.copy Destination:= _ .cells(rows.count,1).End(xlup).Offset(1,0) End With -- Regards, Tom Ogilvy Wally Steadman wrote in message ... Tom, When I put the following code -- set rng = worksheets ("Sheet1").cells(rows.count,1).End(xlup) and let it run with a break in it so I could see values, the rows.count value was 65536 and I guess I was confused as to the last destination line you added. Could you possibly show an example using the following: Sheet 1 has the following: Column A only 1 A 2 B 3 C Sheet2 as the following: Column A only 1 Red 2 Green 3 Blue So after running the code, it would copy the cells from Column A and paste them below the 3 Blue in sheet2, so it would look like: 1 Red 2 Green 3 Blue 4 A 5 B 6 C I hope I was clear enough and really appreciate all the help you have given over the past few days. I am serving in Iraq and trying to work some tracking stuff that takes hours right now and get it down to a few minute process and with all the list help I am getting there slowly but surely. So thanks again Wally Steadman -----Original Message----- set rng = worksheets("Sheet1").cells(rows.count,1).End (xlup) finds the last filled cell, so you can offset by 1 copy something Destination:=rng.offset(1,0) -- Regards, Tom Ogilvy "Wally Steadman" wrote in message ... I have a work sheet where I am copying multiple worksheets to, I would like to programatically do this, but unsure of how to have it look down Column A until it gets to the first Empty Cell and then paste. Was looking at the IsEmpty function but not sure that applies. I also would like to know how I can get the first empty cell in a column. A bit lost on this and I am sure it is very simple. something like Sheets("Sheet1").Cells(isempty) That is my wild guess. Any help would be appreciated. Wally Steadman . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find first empty cell in column | Excel Discussion (Misc queries) | |||
How do i find last not empty cell in a range | Excel Worksheet Functions | |||
Find empty cell then stop | Excel Discussion (Misc queries) | |||
How to: Find first empty cell in column | Excel Worksheet Functions | |||
find last none empty cell | Excel Discussion (Misc queries) |