ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Loop (https://www.excelbanter.com/excel-programming/410777-loop.html)

Heera

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

Mike H

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


Heera

Loop
 
it is not working....

Mike H

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

Mike

"Heera" wrote:

it is not working....


Heera

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

Lars-Åke Aspelin[_2_]

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

Heera

Loop
 
The value will be there in the second wookbook 100% sure. The movment
it will find the value it will update a different value below that
value.


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com