macro help - linking cell reference to number in another cell

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

ioan09

Thread Starter
Joined
Jan 23, 2009
Messages
7
would like to write a macro involving cell references, which changes when the number in another cell changes

e.g if cell = 1, uses b2
if cell = 2, uses b3

please help
 

ioan09

Thread Starter
Joined
Jan 23, 2009
Messages
7
what i mean is, i want the cell reference in my macro to change according to the value in another cell, so if the value is 2, the macro will say (3,2) and if the value is 5, (3,5)
 
Joined
Jul 1, 2005
Messages
8,546
You can use something like:

Cells(3, Range("A1")).Select

But an idea of what you're trying to do overall would be useful.
 
Joined
Oct 20, 2004
Messages
7,837
This formula works if your reference data is in column A in a worksheet called Book3
=IF([Book3]Sheet1!$A1<>"","(3,"&[Book3]Sheet1!$A1&")")
Just enter it into your other sheet and drag down the column - the reference cell will change to A2, A3, etc.
Insert the real name of your other worksheet in place of Book3
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top