Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reading values from a closed workbook | New Users to Excel | |||
Creating a text string by reading content in multiple cells | Excel Worksheet Functions | |||
Reading a worksheet from a specified workbook | Excel Worksheet Functions | |||
How do I stop graphs reading zero in Excel from cells with ""? | Charts and Charting in Excel | |||
Reading Data from another workbook... depending on variable in a cell? | Excel Discussion (Misc queries) |