ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro creation (https://www.excelbanter.com/excel-programming/348104-macro-creation.html)

Rick

Macro creation
 
I would like to create a macro that would generate a small column of words
when needed. The problem is I need the start location to vary. One day in
one cell, the next day another cell. Can this be done?

Sample:

Word1
Word2
Word3
Word4

Column location will vary from excel sheet to excel sheet.

Thanks in advance,

Ric

Paul B

Macro creation
 
Rickm here is one way,

Sub test()
ActiveCell = "word1"
ActiveCell.Offset(1, 0) = "word2"
ActiveCell.Offset(2, 0) = "word3"
ActiveCell.Offset(3, 0) = "word4"
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Rick" wrote in message
...
I would like to create a macro that would generate a small column of words
when needed. The problem is I need the start location to vary. One day

in
one cell, the next day another cell. Can this be done?

Sample:

Word1
Word2
Word3
Word4

Column location will vary from excel sheet to excel sheet.

Thanks in advance,

Ric





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

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