ianfreeman
New Member
- Joined
- Mar 14, 2010
- Messages
- 21
Hi all,
I need to replicate the if(or(... statement within a for next loop.
I am using this to check if a value is in a defined range.
In Column A there is a defined range acting as a database of values.
In Column B there is a range of values updated daily.
In Column C resides the if(or..statement. - this analyses if the cell value is in column A. If it is it returns 1 else 0.
The For Next loop runs down Column C and if the value is 0 the value in column B is copied and pasted in the next blank cell in Column A.
When this happens Column C updates.
This makes for slow code.
If I could house the if(or(...statement in the vba and and remove column c, I'm hoping the speed will increase.
However I do not know the syntax...Can anyone help, please.
Many thanks...
Ian
I need to replicate the if(or(... statement within a for next loop.
I am using this to check if a value is in a defined range.
In Column A there is a defined range acting as a database of values.
In Column B there is a range of values updated daily.
In Column C resides the if(or..statement. - this analyses if the cell value is in column A. If it is it returns 1 else 0.
The For Next loop runs down Column C and if the value is 0 the value in column B is copied and pasted in the next blank cell in Column A.
When this happens Column C updates.
This makes for slow code.
If I could house the if(or(...statement in the vba and and remove column c, I'm hoping the speed will increase.
However I do not know the syntax...Can anyone help, please.
Many thanks...
Ian