ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help creating part of a macro (find Empty column) (https://www.excelbanter.com/excel-programming/299707-help-creating-part-macro-find-empty-column.html)

Jay[_17_]

Help creating part of a macro (find Empty column)
 
I have created a macro which seems to be working fine, however I can't
get it to copy into the right location.

The macro selects a portion of a work sheet, copies it, selects a
different work sheet, and then pastes it.

Now my problem is that every time I run this macro it is pasting over
the same area, but I want to to select the area just to the right of
the current data.

So basically what I need is a way to test if a cell is empty (starting
at B1), if this cell is not empty I want it to move to the next cell
(C1), and repeat until it hits an empty cell, but I can't figure out
how to get this working since I am very new to excel marcos.

Thanks in advance

Bob Phillips[_6_]

Help creating part of a macro (find Empty column)
 
Show us the code, and we can then help more.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jay" wrote in message
om...
I have created a macro which seems to be working fine, however I can't
get it to copy into the right location.

The macro selects a portion of a work sheet, copies it, selects a
different work sheet, and then pastes it.

Now my problem is that every time I run this macro it is pasting over
the same area, but I want to to select the area just to the right of
the current data.

So basically what I need is a way to test if a cell is empty (starting
at B1), if this cell is not empty I want it to move to the next cell
(C1), and repeat until it hits an empty cell, but I can't figure out
how to get this working since I am very new to excel marcos.

Thanks in advance




David

Help creating part of a macro (find Empty column)
 

Sub Macro2()
Sheets("Sheet1").Select
Range("A1").Select
Do Until ActiveCell.Value = ""
ActiveCell.Offset(0, 1).Select
Loop
NewAddress = ActiveCell.Address
End Sub

-----Original Message-----
I have created a macro which seems to be working fine,

however I can't
get it to copy into the right location.

The macro selects a portion of a work sheet, copies it,

selects a
different work sheet, and then pastes it.

Now my problem is that every time I run this macro it is

pasting over
the same area, but I want to to select the area just to

the right of
the current data.

So basically what I need is a way to test if a cell is

empty (starting
at B1), if this cell is not empty I want it to move to

the next cell
(C1), and repeat until it hits an empty cell, but I

can't figure out
how to get this working since I am very new to excel

marcos.

Thanks in advance
.



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

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