Knockoutpie
Board Regular
- Joined
- Sep 10, 2018
- Messages
- 116
- Office Version
- 365
- Platform
- Windows
How do I modify this to search for numerous different phrases instead of just one?
Rows(4).Find("Part Number", LookIn:=xlValues, lookat:=xlWhole).Offset(-1) = "CPN"
Cells.Find(What:="CPN").Activate
ActiveCell.Offset(-1, 0).Select
Do something
Instead of searching for just "Part Number", I'd like to search for either, "CPN", "Part Number", "Part Num", "P/N", or "Mfg PN"
Only one of the above phrases will ever be found.
This code searched for "Part Number" in row 4, replaces it with "CPN" and moves the active cell up 1 row.
Rows(4).Find("Part Number", LookIn:=xlValues, lookat:=xlWhole).Offset(-1) = "CPN"
Cells.Find(What:="CPN").Activate
ActiveCell.Offset(-1, 0).Select
Do something
Instead of searching for just "Part Number", I'd like to search for either, "CPN", "Part Number", "Part Num", "P/N", or "Mfg PN"
Only one of the above phrases will ever be found.
This code searched for "Part Number" in row 4, replaces it with "CPN" and moves the active cell up 1 row.
Last edited: