Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rick
 
Posts: n/a
Default need to automate data into a column

I need a way to create a macro that will populate a column with desired data,
but I need to the data to stop based upon where other columns end. Can this
be done?

Sample data provided below. I want to configure a macro to run and populate
the columns in front of the data using specific (never changing) data, but
the number of rows of data will be changing each time I use this workbook.

52605 08182005
20000 08202005
27459 08222005
36970 08242005
1181340 08222005
95700 08242005
59334 08242005
958102 08232005
12089 08272005
81026 08232005
28122 08182005
26247 08182005

Thank you,

Rick

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Can you pick out a column that always has data:

dim LastRow as long
with activesheet
lastrow = .cells(.rows.count,"C").end(xlup).row
.range("a1:a" & lastrow).value = "hi there!"
end with

would be one way (based on column C).

Rick wrote:

I need a way to create a macro that will populate a column with desired data,
but I need to the data to stop based upon where other columns end. Can this
be done?

Sample data provided below. I want to configure a macro to run and populate
the columns in front of the data using specific (never changing) data, but
the number of rows of data will be changing each time I use this workbook.

52605 08182005
20000 08202005
27459 08222005
36970 08242005
1181340 08222005
95700 08242005
59334 08242005
958102 08232005
12089 08272005
81026 08232005
28122 08182005
26247 08182005

Thank you,

Rick


--

Dave Peterson
  #3   Report Post  
Rick
 
Posts: n/a
Default

Thanks Dave! I haven't run it yet, but I get the idea and it should work
perfectly. That is awesome!

"Dave Peterson" wrote:

Can you pick out a column that always has data:

dim LastRow as long
with activesheet
lastrow = .cells(.rows.count,"C").end(xlup).row
.range("a1:a" & lastrow).value = "hi there!"
end with

would be one way (based on column C).

Rick wrote:

I need a way to create a macro that will populate a column with desired data,
but I need to the data to stop based upon where other columns end. Can this
be done?

Sample data provided below. I want to configure a macro to run and populate
the columns in front of the data using specific (never changing) data, but
the number of rows of data will be changing each time I use this workbook.

52605 08182005
20000 08202005
27459 08222005
36970 08242005
1181340 08222005
95700 08242005
59334 08242005
958102 08232005
12089 08272005
81026 08232005
28122 08182005
26247 08182005

Thank you,

Rick


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format based on data from another column Ellie Excel Discussion (Misc queries) 3 May 14th 08 05:23 PM
displaying data within column iconic83 Charts and Charting in Excel 2 August 19th 05 12:11 AM
2 Column Data lookup Hari Excel Discussion (Misc queries) 2 June 15th 05 07:54 AM
Combining workbooks with some variable field names Bob Dobalina Excel Discussion (Misc queries) 8 May 17th 05 09:48 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM


All times are GMT +1. The time now is 02:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"