Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JB2010
 
Posts: n/a
Default Macro code for dropping to next empty cell

Hi

I am trying to get a macro to copy data from one cell & paste it onto the
bottom of a list, however my current attempt just keeps overwriting one cell
as my current programming seems to have selected an actual cell reference. I
recorded the macro of me copying, then higlighting the cell at the top of the
listing column, hitting CTRL+DOWN CURSOR then down cursor again before
pasting. I thought this would leave the code to always drop to the bottom of
the list & then go one cell further, but this appears not to be the case!

Does anyone know a better (i.e. functioning!) way to program this?

Many thanks in advance, if you need any more info please reply.

cheers

jb
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Macro code for dropping to next empty cell

Activecell.copy activecell.offset(0,1).end(xldown)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JB2010" wrote in message
...
Hi

I am trying to get a macro to copy data from one cell & paste it onto the
bottom of a list, however my current attempt just keeps overwriting one

cell
as my current programming seems to have selected an actual cell reference.

I
recorded the macro of me copying, then higlighting the cell at the top of

the
listing column, hitting CTRL+DOWN CURSOR then down cursor again before
pasting. I thought this would leave the code to always drop to the bottom

of
the list & then go one cell further, but this appears not to be the case!

Does anyone know a better (i.e. functioning!) way to program this?

Many thanks in advance, if you need any more info please reply.

cheers

jb



  #3   Report Post  
JB2010
 
Posts: n/a
Default Macro code for dropping to next empty cell

Hi Bob


sounds good, but i cant work out where that will fit into the current script?


apologies, can you help again?

existing code looks like this:

Range("E1").Select
Selection.Copy
Range("B1").Select
Selection.End(xlDown).Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub


Any help gratefully received


cheers


jb

"Bob Phillips" wrote:

Activecell.copy activecell.offset(0,1).end(xldown)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JB2010" wrote in message
...
Hi

I am trying to get a macro to copy data from one cell & paste it onto the
bottom of a list, however my current attempt just keeps overwriting one

cell
as my current programming seems to have selected an actual cell reference.

I
recorded the macro of me copying, then higlighting the cell at the top of

the
listing column, hitting CTRL+DOWN CURSOR then down cursor again before
pasting. I thought this would leave the code to always drop to the bottom

of
the list & then go one cell further, but this appears not to be the case!

Does anyone know a better (i.e. functioning!) way to program this?

Many thanks in advance, if you need any more info please reply.

cheers

jb




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default Macro code for dropping to next empty cell

jb,

I would suggest that you don't need my code at all, just a small tweak to
your code to work with the activecell

Activecell.Copy
Range("B1").End(xlDown).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub

You would change the B1 to wherever your list starts

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JB2010" wrote in message
...
Hi Bob


sounds good, but i cant work out where that will fit into the current

script?


apologies, can you help again?

existing code looks like this:

Range("E1").Select
Selection.Copy
Range("B1").Select
Selection.End(xlDown).Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub


Any help gratefully received


cheers


jb

"Bob Phillips" wrote:

Activecell.copy activecell.offset(0,1).end(xldown)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JB2010" wrote in message
...
Hi

I am trying to get a macro to copy data from one cell & paste it onto

the
bottom of a list, however my current attempt just keeps overwriting

one
cell
as my current programming seems to have selected an actual cell

reference.
I
recorded the macro of me copying, then higlighting the cell at the top

of
the
listing column, hitting CTRL+DOWN CURSOR then down cursor again before
pasting. I thought this would leave the code to always drop to the

bottom
of
the list & then go one cell further, but this appears not to be the

case!

Does anyone know a better (i.e. functioning!) way to program this?

Many thanks in advance, if you need any more info please reply.

cheers

jb






  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default Macro code for dropping to next empty cell

Difficult to tell with the original code, but maybe this line:

Range("B1").End(xlDown).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False

should be:

Range("B1").End(xlDown).offset(1,0).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False

Just to drop down one more row after that last cell.

Bob Phillips wrote:

jb,

I would suggest that you don't need my code at all, just a small tweak to
your code to work with the activecell

Activecell.Copy
Range("B1").End(xlDown).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub

You would change the B1 to wherever your list starts

--

HTH

RP
(remove nothere from the email address if mailing direct)

"JB2010" wrote in message
...
Hi Bob


sounds good, but i cant work out where that will fit into the current

script?


apologies, can you help again?

existing code looks like this:

Range("E1").Select
Selection.Copy
Range("B1").Select
Selection.End(xlDown).Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub


Any help gratefully received


cheers


jb

"Bob Phillips" wrote:

Activecell.copy activecell.offset(0,1).end(xldown)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JB2010" wrote in message
...
Hi

I am trying to get a macro to copy data from one cell & paste it onto

the
bottom of a list, however my current attempt just keeps overwriting

one
cell
as my current programming seems to have selected an actual cell

reference.
I
recorded the macro of me copying, then higlighting the cell at the top

of
the
listing column, hitting CTRL+DOWN CURSOR then down cursor again before
pasting. I thought this would leave the code to always drop to the

bottom
of
the list & then go one cell further, but this appears not to be the

case!

Does anyone know a better (i.e. functioning!) way to program this?

Many thanks in advance, if you need any more info please reply.

cheers

jb




--

Dave Peterson
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
Getting a macro to see the next available empty cell Mark 688 Excel Discussion (Misc queries) 1 September 9th 05 04:19 PM
Macro help - copy a cell down gjcase Excel Discussion (Misc queries) 3 September 4th 05 05:09 AM
Find the cell value in excel by using vb code Michael Excel Discussion (Misc queries) 5 June 14th 05 01:24 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 01:06 PM.

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

About Us

"It's about Microsoft Excel"