Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I am working in the macro below. The purpose of the macro is to copy and paste a range from one file to another. So far that part of the macro as it is works perfect. However, I need to produce a spreadsheet in which I copy another range but I would like the macro to be able to determine if the range B5 is occupied them move and paste to range B9, if B9 is already occuoied, then paste to range B13, if B13 is occupaied then paste to range B17 tand continue the same pattern as necessary.
Sub CDamielM() ' ' CDamielM Macro ' Macro recorded 3/9/2006 by JAENJ ' ' Range("B7").Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True Selection.Copy Windows("Attendance.xls").Activate Range("B5").Select Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=False Range("B9").Select Windows("MASTER PROGRAM 2006bB.xls").Activate Sheets("Check List").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to change Chart Range when inserting a column | Charts and Charting in Excel | |||
Macro to copy range from Excel files in folder | Excel Discussion (Misc queries) | |||
Is it possible to set a variable range in a macro? | About this forum | |||
Macro - define cell range for a sum function | Excel Discussion (Misc queries) | |||
Macro for Show/Hide Range | Excel Discussion (Misc queries) |