Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Question about Macros in Excel

Is it possible to make a macro repeat a specific amount of lines or be able to start from any cell?

The workbook I have I update on a semi-regular basis. 3 lines are updated when I update the workbook. The macro was recorded to start on a specific cell. When I went to test the macro for a 2nd update, I noticed the macro didn't work properly. When I looked at the code, I saw that the starting point was a specific cell.

The goal would be to edit the macro code to where I could either start it on any cell in the workbook or more specific to be able to use the same macro every 4 rows(the 4th row being the last blank row).
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Question about Macros in Excel

Hi,

Am Sat, 20 Feb 2016 21:04:32 -0800 (PST) schrieb Munster:

The workbook I have I update on a semi-regular basis. 3 lines are updated when I update the workbook. The macro was recorded to start on a specific cell. When I went to test the macro for a 2nd update, I noticed the macro didn't work properly. When I looked at the code, I saw that the starting point was a specific cell.

The goal would be to edit the macro code to where I could either start it on any cell in the workbook or more specific to be able to use the same macro every 4 rows(the 4th row being the last blank row).


if you always have 3 rows of data and then a blank row your next start
cell is:

Dim cStart As Range

Set cStart = Cells(Rows.Count, 1).End(xlUp)(3)


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
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
macros vba question [email protected] Excel Worksheet Functions 1 December 4th 09 05:56 AM
Question on Macros Juan Carlos Excel Discussion (Misc queries) 2 September 10th 09 03:56 PM
question macros wnl2007 Excel Worksheet Functions 1 June 10th 05 10:56 PM
A question regarding Macros DangerMouse114[_8_] Excel Programming 3 May 31st 04 07:11 PM
In addition to previous question, if opening an Excel file in NON-read-only mode, would the macros on the worksheets work as well? Greener Excel Programming 2 October 9th 03 03:40 AM


All times are GMT +1. The time now is 05:23 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"