I'm hoping this will be the last thing in this project!!
I have a macro sorting through data and redistributing it to different cells. I ran into an issue where some of the data I need is not tagged with the required identidfiers and need a macro that will run through and add that identifier in there for me.
Here is some sample data:
Company Name (X)
2121 Street Address
City, ST 88888
PO Box 8888
City, ST 88888
Phone:(888)888-8888
Web:
www.website.comContact Information
Contact Information
Contact Information
Contact Information
Systems: IBM S/390, DEL, NT/200072003. UNIX.
Misc: Misc Information
So what I need is to have the "Contact information" tagged with "OPS:" in front of each line. The problem is that not every contact has a "Systems, Web, or Misc" row. So I think I need it to look for Phone and ask, "Is the next line Web?" if so, it needs to add the tag to the front of the line after Web. If Web is not there, it needs to add it to the line immediately after phone as long as that line is not a company name (identified by (X) in that row).
So it might look like any of these:
Company Name (X)
2121 Street Address
City, ST 88888
PO Box 8888
City, ST 88888
Phone:(888)888-8888
Contact Information
Contact Information
Contact Information
Contact Information
Systems: IBM S/390, DEL, NT/200072003. UNIX.
Misc: Misc Information
Company Name (X)
2121 Street Address
City, ST 88888
PO Box 8888
City, ST 88888
Phone:(888)888-8888
Web:
www.website.comContact Information
Contact Information
Contact Information
Contact Information
Misc: Misc Information
Company Name (X)
2121 Street Address
City, ST 88888
PO Box 8888
City, ST 88888
Phone:(888)888-8888
Web:
www.website.comContact Information
Contact Information
Contact Information
Contact Information
Company Name (X)
2121 Street Address
City, ST 88888
PO Box 8888
City, ST 88888
Phone:(888)888-8888
Web:
www.website.comContact Information
Contact Information
Contact Information
Contact Information
Systems: IBM S/390, DEL, NT/200072003. UNIX.
Misc: Misc
But I need it to turn out like this:
InformationCompany Name (X)
2121 Street Address
City, ST 88888
PO Box 8888
City, ST 88888
Phone:(888)888-8888
OPS: Contact Information
OPS: Contact Information
OPS: Contact Information
OPS: Contact Information
Systems: IBM S/390, DEL, NT/200072003. UNIX.
With or without any of the rows that are missing.
Misc: Misc Information
Start Free Trial