ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   copying with a Macro (https://www.excelbanter.com/excel-worksheet-functions/79463-copying-macro.html)

DonT

copying with a Macro
 
I need some help! I have a workbook which has four sheets, the two that
matter are named work in progress and receipt. My problem is that I need to
copy the name, address, city, state, and zip code from the in progress sheet
to the receipt sheet, one at a time and place them in the proper order. The
problem with the macro is the range is set at the time of the recording, and
the cells change each time I use it.
This is the macro that I recorded. Im NOT a programer, I can record a
macro and understand VERY little of visual basic. Can anyone help me???
Thank you
Don

Range("C8").Select
Selection.Copy
Sheets("Recipt form").Select
Range("E15").Select
ActiveSheet.Paste
Range("E16:I16").Select
Sheets("Bid - In progress").Select
Range("F8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
Range("E16:I16").Select
ActiveSheet.Paste
Range("E17").Select
Sheets("Bid - In progress").Select
Range("G8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("G17").Select
Sheets("Bid - In progress").Select
Range("H8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("I17").Select
Sheets("Bid - In progress").Select
Range("I8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("E18:I18").Select
Sheets("Bid - In progress").Select
Range("E8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
Range("E18:I18").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub

Duke Carey

copying with a Macro
 
Which cells change, and how do they change. Can you specify how one would
objectively determine which cells are to be affected, or is it purely
subjective?

Provide a little detail and you may get some help. Otherwise, this is too
vague a request.

"DonT" wrote:

I need some help! I have a workbook which has four sheets, the two that
matter are named work in progress and receipt. My problem is that I need to
copy the name, address, city, state, and zip code from the in progress sheet
to the receipt sheet, one at a time and place them in the proper order. The
problem with the macro is the range is set at the time of the recording, and
the cells change each time I use it.
This is the macro that I recorded. Im NOT a programer, I can record a
macro and understand VERY little of visual basic. Can anyone help me???
Thank you
Don

Range("C8").Select
Selection.Copy
Sheets("Recipt form").Select
Range("E15").Select
ActiveSheet.Paste
Range("E16:I16").Select
Sheets("Bid - In progress").Select
Range("F8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
Range("E16:I16").Select
ActiveSheet.Paste
Range("E17").Select
Sheets("Bid - In progress").Select
Range("G8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("G17").Select
Sheets("Bid - In progress").Select
Range("H8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("I17").Select
Sheets("Bid - In progress").Select
Range("I8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("E18:I18").Select
Sheets("Bid - In progress").Select
Range("E8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
Range("E18:I18").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub


DonT

copying with a Macro
 
In my workbook there is four sheets, the two that matter are named work in
progress and receipt. My problem is that I need to copy the customers name
from in progress and put it on receipt, then copy the address, then city,
then state, and then zip code from the in progress to the receipt, placing
them in the proper order. Each customers name is on a row, the first one may
start at C4 for the name, the address is F4, state is G4 and so on. The next
customers name that I need may start at C8 for the name , address F8, state
G8. The problem with the macro that I recorded is it is set at C8, I need to
be able to pick which customers name and address.
This is the macro that I recorded.
Thank you
Don


"Duke Carey" wrote:

Which cells change, and how do they change. Can you specify how one would
objectively determine which cells are to be affected, or is it purely
subjective?

Provide a little detail and you may get some help. Otherwise, this is too
vague a request.

"DonT" wrote:

I need some help! I have a workbook which has four sheets, the two that
matter are named work in progress and receipt. My problem is that I need to
copy the name, address, city, state, and zip code from the in progress sheet
to the receipt sheet, one at a time and place them in the proper order. The
problem with the macro is the range is set at the time of the recording, and
the cells change each time I use it.
This is the macro that I recorded. Im NOT a programer, I can record a
macro and understand VERY little of visual basic. Can anyone help me???
Thank you
Don

Range("C8").Select
Selection.Copy
Sheets("Recipt form").Select
Range("E15").Select
ActiveSheet.Paste
Range("E16:I16").Select
Sheets("Bid - In progress").Select
Range("F8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
Range("E16:I16").Select
ActiveSheet.Paste
Range("E17").Select
Sheets("Bid - In progress").Select
Range("G8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("G17").Select
Sheets("Bid - In progress").Select
Range("H8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("I17").Select
Sheets("Bid - In progress").Select
Range("I8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
ActiveSheet.Paste
Range("E18:I18").Select
Sheets("Bid - In progress").Select
Range("E8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recipt form").Select
Range("E18:I18").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub



All times are GMT +1. The time now is 04:11 PM.

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