Excel 2003 VBA CODING FOR MACRO

1089 views 1 replies

Dear Users,

I need your asistance with coding of the Excel 2003 macro. I have started but finding difficult to move ranges in the table below from left to right (col A to Col B okay already coded but from Col C to D, From D to E - can not code in the table below. I hace numbered the steps and parly completed macro follow below.

Many thanks in looking to help.

Below range table is Worksheet10 that Macro refers        
A B C D E F ROW
WorkSheets Sheet Range1 Range2 Range3 Now
1
1
TLoad G7:G47 H7:H46 K7:K46 Loop/Next
2
2
TLoad G7:G47 H7:H46 K7:K46 Loop
3
3
TLoad G7:G47 H7:H46 K7:K46 Loop
4
4
TLoad G7:G47 H7:H46 K7:K46 Loop
5
5
TLoad G7:G47 H7:H46 K7:K46 Loop
6


Steps:


1. Macro starts, Goes to Worksheet10 cell A2, then goes to worksheet("1"). Activate
2. Range ("G7:G47").SELECT
3. Selection.Copy then goes to sheet "TLOAD"
4. Sheets(sheetaddname).Select - Which is sheet TLOAD
5. Range("A1").Select
6. Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False
7. Goes to Worksheet10 selects Range2 - ("H7:H47") COPY
8. Goes to Sheets(sheetaddname).Select - Which is sheet TLOAD
9. Range("B1").Select
10. ActiveSheet.Paste
11. Goes to Worksheet10 selects Range3 - ("k7:k47") COPY
12. Goes to Sheets(sheetaddname).Select - Which is sheet TLOAD
13. Range("C1").Select
14. ActiveSheet.Paste
15. Insert 41 rows
16 next - now loops/Next to Row 2 reference in worksheet10


Part Macro

Sub try03()
Dim sheetname
Dim sheetaddname
 
'sheetname = 1
 
For Each c In Worksheets("10").Range("a3:a7").Cells
 
sheetname = c
sheetaddname = c.Offset(rowOffset:=0, columnOffset:=1)
 
Sheets(sheetname).Select
Worksheets("10").Activate
Range("A2").Activate
range1 = ActiveCell.Value
'Range("C2").Select - Which is ("g7:G47") How to code this e.g sheetaddname = c. Offset(rowOffset:=0, columnOffset:=2)
Range(range1).Select
Selection.Copy
ActiveWindow.SmallScroll ToRight:=1
Sheets(sheetname).Select
Worksheets("TLOAD").Activate
Range("A1").Activate
ActiveSheet.Paste
Replies (1)

Come on Guys this is very simple task, I have the solution. Let see who can  give abetter solution!!!


CCI Pro

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
ARTICLESHIP 20 June 2026
Articleship

RB KESHRI & CO

Mumbai

B.Com

View Details
Company
20 June 2026
Assistant Accounts Manager

Fintax Professionals

Gurgaon

CA Inter

View Details
Company
01 June 2026
Audit, Taxation & Compliance Executive

R P S K & Associates

Nashik

CA Inter

View Details
Company
26 May 2026
CA / MBA (Finance) / CMA / M.Com (Finance)

Sri Aurobindo Gnostic Centre of Education

New Delhi

CA

View Details
Company
Featured 15 June 2026
Senior Auditor

N. Dhawan & Co

New Delhi

CA Inter

View Details
Company
16 June 2026
Sr. Associate / Assistant Manager | TAS / FDD

Boutique Investment Bank & Transaction Advisory Firm

Gurgaon

CA

View Details
Company
26 May 2026
Senior Accountant cum purchase Manager

Vardhaman Group of India

Pimpri Chinchwad

CA Inter

View Details
Company
26 May 2026
Audit executive

vdsr & co LLP

Chennai

CA Inter

View Details