Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default How do i refer to cell contents in a macro?

I am a novice and i am trying to write a macro to position the sheet at a cell.
The cell reference that i want to go to is a variable which is the
calculated content of another cell (CELL 2). How do i insert the CONTENTS of
cell 2 (address I want to go to: i.e. R45) into the macro so it works
properly?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How do i refer to cell contents in a macro?

Lets say A1 contains the formula
="Z" & ROW()*100

A1 displays:
Z100

Then:

Sub GoThere()
Application.Goto reference:=Range(Range("A1").Value)
End Sub

--
Gary''s Student - gsnu200909


"Rob" wrote:

I am a novice and i am trying to write a macro to position the sheet at a cell.
The cell reference that i want to go to is a variable which is the
calculated content of another cell (CELL 2). How do i insert the CONTENTS of
cell 2 (address I want to go to: i.e. R45) into the macro so it works
properly?

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
Use cell contents to refer to a sheetname in a formula cp Excel Worksheet Functions 6 September 29th 08 06:56 PM
Refer to a worksheet/name using cell contents? Caeres Excel Worksheet Functions 5 September 23rd 08 03:23 AM
Refer in macro to cell Przemek Wrzesiński Excel Programming 1 April 26th 08 05:51 PM
Contents of a cell refer to sheet name Audio_freak Excel Programming 3 May 29th 04 10:05 PM
Using contents of cell to refer to a worksheet Mike[_50_] Excel Programming 3 September 24th 03 01:03 AM


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