Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Go to sheet based on column

How would I go to Sheet1, Sheet2 or Sheet3 in a database of names with
32 rows, 17 columns? If a name I find a match for is in Column B, go
to Sheet1, if a name is in Column C go to Sheet2, etc. (I need to
start from Column B) My lookup value will be a name, not a cell
reference. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Go to sheet based on column


Not sure if I completely follow.
If the list of names is in an Excel worksheet and the matching results
in the cell being selected, then I'd set it up as follows:

Select Case ActiveCell.Column
Case 2 'column B
Sheets(1).Select
Case 3 'column C
Sheets(2).Select

(and so on...)

End Select



On 18 Sep 2003 20:56:58 -0700, (Tim M.) wrote:

How would I go to Sheet1, Sheet2 or Sheet3 in a database of names with
32 rows, 17 columns? If a name I find a match for is in Column B, go
to Sheet1, if a name is in Column C go to Sheet2, etc. (I need to
start from Column B) My lookup value will be a name, not a cell
reference. Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Go to sheet based on column

depends on how the result is determined.
For instance, if the return is a cell then Cell.Column
could be used

Worksheets(Cell.Column-1).Activate

Otherwise if the result is simply the column number

Worksheets(FoundColumn-1).Activate

If its a letter (A,B...) then
Worksheets(ASC(ColLetter)-65).Activate

...."A" is ASCII 65 so B is 66 hence if B is passed
ASC("B") - 65 = 1


HTH
PAtrick Molloy
Microsoft Excel MVP

-----Original Message-----
How would I go to Sheet1, Sheet2 or Sheet3 in a database

of names with
32 rows, 17 columns? If a name I find a match for is in

Column B, go
to Sheet1, if a name is in Column C go to Sheet2, etc.

(I need to
start from Column B) My lookup value will be a name, not

a cell
reference. Thanks.
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Go to sheet based on column

I'm going to have to find out how to do this by using ADDRESS, MATCH,
& INDEX I guess. I've got a headache trying to figure this out!!
Suppose I have a list of names from B24:R24. In A24 I have a State
name, Texas. In D:24 I have the state Arizona. I also have Arizona in
M:24. I want to do a match for Texas in A24, searching that row for
Arizona. If it finds Arizona in D24, (the third column from columnA, I
want to goto Sheet3 and see if cell C24 is greater than D24. Then I
want to do another Match on Row 24 (the Texas row) and find the second
"Arizona". It's in M24, the 12th column from ColumnA (Texas). Then, I
need to goto Sheet12 and see if C24 is greater than D24. I can do all
this with a lot of typing and a lot of "IF's", but I reuse this
program yearly, and the names of states are in different places year
to year. Maybe I'll have an answer this weekend, or figure it out.
I've searched by keywords in this forum and haven't found this
question answered yet. I was hoping to do it with a formula, but the
VBE may be what I need. I'll start trying it from that method. Thanks
for the time. Tim
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Go to sheet based on column

I found a workaround that does well. I'd still like to know if this
can be done in a formula. Thx, Tim.
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
Seperate data from one sheet to multiple sheets based on a column [email protected] Excel Discussion (Misc queries) 7 September 8th 07 12:31 AM
Moving data in one excel column to another sheet based on user input [email protected] Excel Discussion (Misc queries) 1 May 10th 07 05:47 PM
Copy rows of one sheet into mutiple sheets based on column value Wesley Breshears Excel Discussion (Misc queries) 0 October 18th 06 03:19 PM
MACRO - copy rows based on value in column to another sheet Michael A Excel Discussion (Misc queries) 1 March 5th 05 02:15 AM
Cut rows from one sheet into multiple sheets based on a criteria in first column pepino13 Excel Programming 1 September 11th 03 09:52 PM


All times are GMT +1. The time now is 08:26 AM.

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"