Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Reading Cells is the same workbook different tab

I am trying to get something to work and having a hard time any help is
appreciated.

I want to type a "tab" name in cell "A1", then in cell "B2" I want to return
the value in the "tab" specified for the cell specified. For example active
cell "A1" reads "tab" "sheet2", and in in cell "B2" returns the data (nember)
from sheet2 cell "K2" Below I think is a start:

=ActiveCell.Range(A1),value2,"K2"

but get an error when I put this into the cell?? any suggestions...
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Reading Cells is the same workbook different tab

I'm confused.

Are you looking for function suggestion?

If yes, then I had this:
A1: Sheet2
A2: K2
A3: =indirect("'" & a1 & "'!" & a2)

To return the value from Sheet2!K2.

In code, I'd use:

dim myVal as variant
with worksheets("sheet1")
myval = worksheets(.range("a1").value).range(.Range("a2"). value).value
.range("A3").value = myVal
end with

I didn't provide any validation for either of these.


Mike wrote:

I am trying to get something to work and having a hard time any help is
appreciated.

I want to type a "tab" name in cell "A1", then in cell "B2" I want to return
the value in the "tab" specified for the cell specified. For example active
cell "A1" reads "tab" "sheet2", and in in cell "B2" returns the data (nember)
from sheet2 cell "K2" Below I think is a start:

=ActiveCell.Range(A1),value2,"K2"

but get an error when I put this into the cell?? any suggestions...


--

Dave Peterson
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
Reading values from a closed workbook Graham F New Users to Excel 6 July 28th 08 03:32 PM
Creating a text string by reading content in multiple cells smaruzzi Excel Worksheet Functions 3 February 8th 07 05:12 PM
Reading a worksheet from a specified workbook [email protected] Excel Worksheet Functions 1 December 8th 06 12:45 AM
How do I stop graphs reading zero in Excel from cells with ""? ThomasStudd Charts and Charting in Excel 2 September 28th 06 04:11 PM
Reading Data from another workbook... depending on variable in a cell? Rob Moyle Excel Discussion (Misc queries) 4 March 13th 06 04:21 PM


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