Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default 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
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
selecting cells in different worksheets Kaitlin.uk Excel Discussion (Misc queries) 2 January 17th 07 04:46 PM
Control for selecting cells in worksheets Mats Nilsson Excel Programming 2 June 29th 06 07:31 AM
Comment BUG- selecting cells on other worksheets CFD Excel Discussion (Misc queries) 3 March 6th 06 07:04 AM
Selecting WorkSheets Jordan Excel Programming 3 February 25th 05 07:10 PM
selecting worksheets Matthew Kramer Excel Programming 1 August 16th 04 10:39 PM


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