Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Cells on two worksheets
In my workbook i have VB code to select a specific cell based on
specific criteria. How can I select the corresponding cell on another worksheet. For example I want to find cell A4 on Sheet 1 and select both that cell and Cell A4 on Sheet2 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Cells on two worksheets
Try this
Sheets(Array("Sheet1", "Sheet2")).Select ' Add as many sheets as you need Range("A4").Select "stewdizzle" wrote: In my workbook i have VB code to select a specific cell based on specific criteria. How can I select the corresponding cell on another worksheet. For example I want to find cell A4 on Sheet 1 and select both that cell and Cell A4 on Sheet2 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Cells on two worksheets
one way
Sub test2() Dim ws1 As Worksheet Dim ws2 As Worksheet Set ws1 = Worksheets("Sheet1") Set ws2 = Worksheets("Sheet2") ws1.Select ws2.Select False Range("A4").Select End Sub -- Gary "stewdizzle" wrote in message oups.com... In my workbook i have VB code to select a specific cell based on specific criteria. How can I select the corresponding cell on another worksheet. For example I want to find cell A4 on Sheet 1 and select both that cell and Cell A4 on Sheet2 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Cells on two worksheets
that is kind of what i wanted but i need to search for a text string
that is on Sheet 1 and then select that cell on both sheets. I wont actually know what the exact cell location is when i type my code On Mar 4, 10:17 pm, "Gary Keramidas" <GKeramidasATmsn.com wrote: one way Sub test2() Dim ws1 As Worksheet Dim ws2 As Worksheet Set ws1 = Worksheets("Sheet1") Set ws2 = Worksheets("Sheet2") ws1.Select ws2.Select False Range("A4").Select End Sub -- Gary "stewdizzle" wrote in message oups.com... In my workbook i have VB code to select a specific cell based on specific criteria. How can I select the corresponding cell on another worksheet. For example I want to find cell A4 on Sheet 1 and select both that cell and Cell A4 on Sheet2 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Cells on two worksheets
Look for the MATCH function in th VB Help files and use it to search an array
for you text string, the result will then be the cell you select in the code I posted. Sorry I haven't time to write and test a bit of code, this is a flying visit, hopefully it put you in the right direction Mark "stewart" wrote: that is kind of what i wanted but i need to search for a text string that is on Sheet 1 and then select that cell on both sheets. I wont actually know what the exact cell location is when i type my code On Mar 4, 10:17 pm, "Gary Keramidas" <GKeramidasATmsn.com wrote: one way Sub test2() Dim ws1 As Worksheet Dim ws2 As Worksheet Set ws1 = Worksheets("Sheet1") Set ws2 = Worksheets("Sheet2") ws1.Select ws2.Select False Range("A4").Select End Sub -- Gary "stewdizzle" wrote in message oups.com... In my workbook i have VB code to select a specific cell based on specific criteria. How can I select the corresponding cell on another worksheet. For example I want to find cell A4 on Sheet 1 and select both that cell and Cell A4 on Sheet2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
selecting cells in different worksheets | Excel Discussion (Misc queries) | |||
Control for selecting cells in worksheets | Excel Programming | |||
Comment BUG- selecting cells on other worksheets | Excel Discussion (Misc queries) | |||
Selecting WorkSheets | Excel Programming | |||
selecting worksheets | Excel Programming |