Thread: VB in Excel
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
justvree justvree is offline
external usenet poster
 
Posts: 9
Default VB in Excel

Ok, I'll try that (have to go home now *Grin*). Is there a way as well to
reference the date? For instance, if your "something" is TODAY() or
YESTERDAY() etc and make TODAY() match a cell that would have 10/20/2006 in
it?

THanks for your help BTW

"Jim Thomlinson" wrote:

You can do a vlookup with the indirect function as the second parameter. You
will need to know which range on which sheet that you are looking at

=vlookup(something, indirect(A1 & "!" & A2), 2, false)

Where A1 contains the sheet name and A2 contains the range address to look
in...
--
HTH...

Jim Thomlinson


"justvree" wrote:

will that work if I'm going to different cells? Meaning, I need it to go to
Nicole's sheet, search for a certain date, grab the info on that row and put
it back on the main page. I may be doing this complicatedly, but I"m trying
to make it do what a boss wants it to do *Grin* It's not possible otherwise
LOL

"Jim Thomlinson" wrote:

In Cell A1 put Sheet1 or Sheet2. this formula will return the value from Cell
A1 on that sheet. What it does is allows you to build a Sheet!cell address
that you want to reference...

=indirect(A1 & "!A1")

--
HTH...

Jim Thomlinson


"justvree" wrote:

No... didn't know there was one. How does that work (I'll do a search in the
meantime)

"Jim Thomlinson" wrote:

Have you tried using the indirect worksheet function?
--
HTH...

Jim Thomlinson


"justvree" wrote:

What I have is a list of names, and a value beside it. Each name has it's
own sheet within the workbook. I'm trying to call a macro/VB script in order
for it to go to the worksheet I need, pull the info and put it into the value
beside the name in the list. If I hard code the name itself, I can get it to
go to the worksheet, pull the information I need and put it back on the first
worksheet. But how can I say "Go to the worksheet with the name in this
cell"?
Sheets("Nicole").Activate - works
Sheets(ActiveCell.Value).Activate - is what I want to do - but it's not
working. What's in the "quotes" I want to populate with the name in the cell.

How do I do this? CAN I do this, or am I just crazy? :) Any help will be
appreciated.