LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default optimizing a macro

Hi All,

I have the following macro...


Range("b10").Select

Do
ActiveCell.FormulaR1C1 = ActiveCell.Offset(-1, 0) + 1
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell.Offset(-1, 0).Value = Range("e1").Value

Range("b1").Select

It starts at b10 which is a date, 21 jun. it runs down the colum
putting in the dates 22, 23, 24 June... until it gets to today's date
it stops by checking the cell e1 which contains the formula =today().

this works fine, however as the days go on and on its going to tak
longer and longer to run because it always starts at the beginning, 2
June in b10.

Is there anyway to amend the code to force it to start at the max valu
in column b?

Any help/comments appreciated.

(note: i dont want to use formulae eg =if(b11today(),"",b10+1) becaus
all cells below todays date have to be empty.

--
Message posted from http://www.ExcelForum.com

 
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
Optimizing mortage payback Hannes Excel Worksheet Functions 0 September 14th 05 09:01 AM
MapPoint Optimizing mak Excel Discussion (Misc queries) 0 August 17th 05 09:30 PM
optimizing a lookup Yakimo[_2_] Excel Programming 1 May 28th 04 04:02 PM
Optimizing an investment portfolio Thomas T. Halikias Excel Programming 0 May 11th 04 02:53 AM
Optimizing in VB Phil Excel Programming 1 August 8th 03 05:18 PM


All times are GMT +1. The time now is 10:32 PM.

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

About Us

"It's about Microsoft Excel"