jevi
Active Member
- Joined
- Apr 13, 2010
- Messages
- 339
- Office Version
- 2016
- Platform
- Windows
Hi All,
I have registered this macro but is not working well. I would like that check the data in column A (might be everyday different rows of data) and if you find the code 100000 then in the column it should write the code 90...so in this case it did find the code 100000 in the row A306 and A307 and it changed the data in row Q306 and Q307 but the problem is that this code 100000 is not everyday in the same rows, sometimes it might be in two or 3 rows. Any help how to achieve it?
Thank you
I have registered this macro but is not working well. I would like that check the data in column A (might be everyday different rows of data) and if you find the code 100000 then in the column it should write the code 90...so in this case it did find the code 100000 in the row A306 and A307 and it changed the data in row Q306 and Q307 but the problem is that this code 100000 is not everyday in the same rows, sometimes it might be in two or 3 rows. Any help how to achieve it?
VBA Code:
Columns("A:A").Select
Selection.Find(What:="100000", After:=ActiveCell, LookIn:=xlFormulas2, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Selection.FindNext(After:=ActiveCell).Activate
Range("Q306:Q307").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "990"
Range("Q307").Select
ActiveCell.FormulaR1C1 = "990"
Range("Q307").Select
Thank you