shstrating
Board Regular
- Joined
- Sep 8, 2009
- Messages
- 65
- Office Version
- 365
- Platform
- Windows
Using Excel for Microsoft 365 32-bit on Win10 Pro v.22H2 64-bit system.
I'm fairly experienced with Excel, but no experience with VBA other than asking this group for help and plagiarizing what is provided.
I have a single column of data that contains several groups of data.
Each group of data begins with a cell containing the string PO= as the prefix.
I need to Search the data to find instances of the string RCBM.
When an instance is found I then need to Search back up the column of data to find the first occurrence of PO= and return the string minus the PO= prefix.
I have to do this across several files, some of which contain only one instance of RCBM while others contain over 3500 instances, meaning I need to find anywhere from 1 to 3500+ PO= strings depending on the file.
Here is a very shortened example of what the data looks like:
PO=KR3TA2007-VEN-FIN_KR3TA200701
OG=Veneer Finish
ON=(UND)
IM=UNDCOL
ON=038A
OD=VEN: Rustic Walnut / Low Gloss / Closed Pore
ON=039A
OD=VEN: Pippy Oak / Low Gloss / Closed Pore
ON=V414
OD=VEN: Natural Oak RCBM
So in this example data I need to search down the column until I find RCBM and then search back up the column to find the PO= prefix and return the value KR3TA2007-VEN-FIN_KR3TA200701.
It's frustrating because I believe this is a no-brainer using VBA, but I don't even know where to start because I have no VBA knowledge.
If it's possible to do this with formulas I am also open to that.
Thanks,
Steve
I'm fairly experienced with Excel, but no experience with VBA other than asking this group for help and plagiarizing what is provided.
I have a single column of data that contains several groups of data.
Each group of data begins with a cell containing the string PO= as the prefix.
I need to Search the data to find instances of the string RCBM.
When an instance is found I then need to Search back up the column of data to find the first occurrence of PO= and return the string minus the PO= prefix.
I have to do this across several files, some of which contain only one instance of RCBM while others contain over 3500 instances, meaning I need to find anywhere from 1 to 3500+ PO= strings depending on the file.
Here is a very shortened example of what the data looks like:
PO=KR3TA2007-VEN-FIN_KR3TA200701
OG=Veneer Finish
ON=(UND)
IM=UNDCOL
ON=038A
OD=VEN: Rustic Walnut / Low Gloss / Closed Pore
ON=039A
OD=VEN: Pippy Oak / Low Gloss / Closed Pore
ON=V414
OD=VEN: Natural Oak RCBM
So in this example data I need to search down the column until I find RCBM and then search back up the column to find the PO= prefix and return the value KR3TA2007-VEN-FIN_KR3TA200701.
It's frustrating because I believe this is a no-brainer using VBA, but I don't even know where to start because I have no VBA knowledge.
If it's possible to do this with formulas I am also open to that.
Thanks,
Steve