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 Cell referencing in Macros

I have automatically created a macro - however would like to modify it so
that it uses data in cell fields rather than hardcoded values in the macro.
For example: sheet selection currerntly is

sheets("wk3").Select

I want to make this more flexible by using a value in cell B2 that contains
the value "wk3". I have attempted unsuccessfully to change the macro as it
errors when I put in the cell reference B2. By doing this it will mean I no
longer need to change the macro each time when the week changes - I just need
to change the value in B2 to the current sheet name.

If the reponse could also include referencing the sheet name for the cell B2
as well that would be great - e.g. Summary!B2 or whatever the answer.

Many thanks

 
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
Cell referencing in Macros Bern Notice[_2_] Excel Programming 5 February 28th 09 11:36 PM
Cell referencing, formulas, macros bpotter Excel Programming 4 January 15th 09 07:55 PM
Referencing workbooks in macros Neil[_5_] Excel Programming 1 August 14th 07 06:16 AM
Referencing Macros John Excel Programming 4 May 5th 04 11:01 PM
Referencing Cells in Macros Gerry[_7_] Excel Programming 2 October 24th 03 01:25 PM


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

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"