#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Loop

Hi,

Here is the code.

I am finding a date in the active sheet which should match with the
date which is there in the other workbook.

I cannot delare it as variable because there are many dates and this
loop is a part of another loop.

Do Until Selection.Value = Workbooks("Hiring Plan").Sheets("C
LLC").ActiveCell.Value
Selection.Offset(0, 1).Select
Loop

Please help.

Regards

Heera
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Loop

Hi,

Maybe something like this

Sub stantial()
Do Until Selection.Value = Workbooks("Hiring Plan.xls").Sheets("CLLC
").Range("A1").Value
ActiveCell.Offset(0, 1).Select
Loop
End Sub

Mike

"Heera" wrote:

Hi,

Here is the code.

I am finding a date in the active sheet which should match with the
date which is there in the other workbook.

I cannot delare it as variable because there are many dates and this
loop is a part of another loop.

Do Until Selection.Value = Workbooks("Hiring Plan").Sheets("C
LLC").ActiveCell.Value
Selection.Offset(0, 1).Select
Loop

Please help.

Regards

Heera

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Loop

it is not working....
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Loop

Can you expand on that? In what way isn't it working.

Mike

"Heera" wrote:

it is not working....

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Loop

I have two workbooks.

In 1st workbook there is a value.

My macro should go to the 2nd workbook and find the value of 1st
workbook on which my cursor is.

for example 1st workbooks has a value 50K in C6 cell
then My macro should go in 2nd workbook and find 50K in selected
range.
then again it should come back to the C6 cell of 1st workbook.

I recoreded a Macro of (ctrl+f ) but it is giving an error.

Regards

Heera


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default Loop

On Mon, 12 May 2008 04:51:17 -0700 (PDT), Heera
wrote:

I have two workbooks.

In 1st workbook there is a value.

My macro should go to the 2nd workbook and find the value of 1st
workbook on which my cursor is.

for example 1st workbooks has a value 50K in C6 cell
then My macro should go in 2nd workbook and find 50K in selected
range.
then again it should come back to the C6 cell of 1st workbook.

I recoreded a Macro of (ctrl+f ) but it is giving an error.

Regards

Heera



What do you want the macro to do with the result of the search when it
"comes back to the C6 cell"?

Example 1:
The value was found in cell X17 of 2nd workbook.
What do you want to happen?

Example 2:
The value was not found in any cell of 2nd workbook.
What do you want to happen?

Lars-Åke
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
returning back to loop check condition without completing the loop ashish128 Excel Programming 13 April 3rd 08 12:53 PM
Loop to Filter, Name Sheets. If Blank, Exit Loop ryguy7272 Excel Programming 3 February 5th 08 03:41 PM
Naming Worksheets - Loop within a loop issue klysell Excel Programming 5 March 29th 07 05:48 AM
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM


All times are GMT +1. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"