Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to Paste to specific line, and continue to Paste each time on next row not over

Hello-
I am new to macros and would like some help. I have a spreadsheet tha
does some calcuations based on numbers you input (cells B9 to E
require you to input numbers, F9,G9,H9 and I9 report numbers from shee
two cells that are generated by the B9 to E9 pn sheet 1).I have
command button that copies the B9:I9 Line down to B13, then clears B
to E9 for new data entry. I'd like to be able to hit my button agai
and have the macro go to paste at B13, see that data is there an
proceed to B14 and paste and then next time see B14 is populated go t
B15, etc.. Any help with this is appreciated - below is what I hav
assigned to my command button.

Also I only have 97 so keep that in mind
Thanks -Tom



Range("B9:I9").Select
Selection.Copy
Range("B13").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:
_
False, Transpose:=False
Application.CutCopyMode = False
Range("B9:F9").Select
Selection.ClearContents
Range("A9").Selec

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Macro to Paste to specific line, and continue to Paste each time on next row not over

Tom,

Change,

Range("B13").Select

to

Range("B65536").End(xlUp)(2).Select

HTH,
Bernie
MS Excel MVP

"tomkarakowski " wrote in
message ...
Hello-
I am new to macros and would like some help. I have a spreadsheet that
does some calcuations based on numbers you input (cells B9 to E9
require you to input numbers, F9,G9,H9 and I9 report numbers from sheet
two cells that are generated by the B9 to E9 pn sheet 1).I have a
command button that copies the B9:I9 Line down to B13, then clears B9
to E9 for new data entry. I'd like to be able to hit my button again
and have the macro go to paste at B13, see that data is there and
proceed to B14 and paste and then next time see B14 is populated go to
B15, etc.. Any help with this is appreciated - below is what I have
assigned to my command button.

Also I only have 97 so keep that in mind
Thanks -Tom



Range("B9:I9").Select
Selection.Copy
Range("B13").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Application.CutCopyMode = False
Range("B9:F9").Select
Selection.ClearContents
Range("A9").Select


---
Message posted from http://www.ExcelForum.com/



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
Macro - Copy/Paste Special to Next Blank Line lajohn63 New Users to Excel 2 August 27th 12 09:27 PM
Cut and paste specific data Father John Excel Discussion (Misc queries) 1 April 19th 10 11:33 PM
Macro-continue to paste last column puiuluipui Excel Discussion (Misc queries) 0 September 24th 09 10:02 PM
A Macro that will cut and paste to specific cell VBA12thRoundDraftPick Excel Discussion (Misc queries) 1 March 31st 05 06:11 AM
Macro to Copy/Paste then Paste to Next Line tomkarakowski Excel Programming 1 May 28th 04 01:19 AM


All times are GMT +1. The time now is 06:57 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"