ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use cell value to adjust date range (https://www.excelbanter.com/excel-programming/428167-use-cell-value-adjust-date-range.html)

GoBucks[_2_]

Use cell value to adjust date range
 
I have a range (M6:BM6) which consists of week end dates = every Friday (M6 =
5/8/09; BM=5/7/10). I would like to have the range adjusted based on when a
cell (B3) is updated. For example, currently B3=5/5/09 and M6=5/8/09 (week
end date of B3). If B3 was updated to 5/12, I would like to have the range
automatically updated to M6=5/15/09, N6=5/22/09....BM=5/14/10. I could do
this with excel formulas in the sheet but would like to macro code adjust the
values in the range rather than formulas.

Any suggestions?? Could this be accomplished by a Worksheet Event?

royUK[_112_]

Use cell value to adjust date range
 

There's no point using VBA if formulas will do the job. Apart from the
fact that the formulas should be simpler, using macros means that the
user must enable macros, not always the case.


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=94356


GoBucks[_2_]

Use cell value to adjust date range
 
I totally understand but the date ranges are used in other macros and those
work much better with values rather than formulas. Otherwise, I wouldn't
attempt to use VBA.

"royUK" wrote:


There's no point using VBA if formulas will do the job. Apart from the
fact that the formulas should be simpler, using macros means that the
user must enable macros, not always the case.


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=94356




All times are GMT +1. The time now is 03:54 PM.

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