Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Macro reference to a specific cell on a different worksheet

I am looking up text in a table. I have the following code that works if the
text in the active cell matches the text in A1.

How can I modify this code so that the A1 range being referenced is on a
different worksheet. I'm sure this is pretty simple, but I can't get it
right.

If ActiveCell.Text = Range("a1").Text Then
ActiveCell.Select

Thanks, Nicki
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Macro reference to a specific cell on a different worksheet

If ActiveCell.Text = Worksheets("Sheet1").Range("a1").Text Then
ActiveCell.Select
End If

If this post helps click Yes
---------------
Jacob Skaria


"Nickis" wrote:

I am looking up text in a table. I have the following code that works if the
text in the active cell matches the text in A1.

How can I modify this code so that the A1 range being referenced is on a
different worksheet. I'm sure this is pretty simple, but I can't get it
right.

If ActiveCell.Text = Range("a1").Text Then
ActiveCell.Select

Thanks, Nicki

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Macro reference to a specific cell on a different worksheet

Thank You!

"Jacob Skaria" wrote:

If ActiveCell.Text = Worksheets("Sheet1").Range("a1").Text Then
ActiveCell.Select
End If

If this post helps click Yes
---------------
Jacob Skaria


"Nickis" wrote:

I am looking up text in a table. I have the following code that works if the
text in the active cell matches the text in A1.

How can I modify this code so that the A1 range being referenced is on a
different worksheet. I'm sure this is pretty simple, but I can't get it
right.

If ActiveCell.Text = Range("a1").Text Then
ActiveCell.Select

Thanks, Nicki

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
Recording Macro - Excel makes reference to a specific cell FamilyGuy902 Excel Programming 4 November 24th 06 06:05 PM
Macro If statement to go to a specific cell in another worksheet [email protected] Excel Programming 1 November 23rd 05 12:44 AM
Macro to cut rows into another worksheet if a cell contains a specific word Jason via OfficeKB.com Excel Programming 4 May 7th 05 11:33 AM
Start relative reference macro from specific cell Bob K. Excel Programming 1 October 20th 04 05:58 AM
Macro to copy text to a specific cell reference shanman_lmtd Excel Programming 3 July 23rd 04 03:32 PM


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

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"