Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Find Empty Cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find Empty Cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Find Empty Cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find Empty Cell

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find first empty cell in column TomHull Excel Discussion (Misc queries) 2 November 9th 09 01:37 AM
How do i find last not empty cell in a range excelent Excel Worksheet Functions 9 December 31st 08 01:59 PM
Find empty cell then stop Dolphinv4 Excel Discussion (Misc queries) 1 May 28th 08 02:24 PM
How to: Find first empty cell in column DW Excel Worksheet Functions 18 October 12th 07 05:57 AM
find last none empty cell kevcar40 Excel Discussion (Misc queries) 3 March 1st 06 11:59 AM


All times are GMT +1. The time now is 01:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"