Loop

H

Heera

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
 
H

Heera

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
 
L

Lars-Åke Aspelin

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
 
H

Heera

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top