Macro to pars data

Dkeller12

Board Regular
Joined
Oct 7, 2011
Messages
60
I have a spreadsheet that contains names and addresses. What I need is a macro that will search each address in column F and if the address contains an apartment number (100 MAIN ST APT 123) I need to have the APT 123 stripped out and moved to Column G leaving 100 MAIN ST in column F. This must loop through the entire column F and do this for any address that contains and APT #.

Can anyone help me out with this request?

Thanks in advance.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
if there is currently data in Column H... insert a new column into H
highlight Column G... [ctrl]+[f]... find " APT " replace with an obscure character and "APT " ("~APT " for example)
Data > Text To column > Delimited > use the character as delimiter (~ for example)
this should create a new column with anything that was after APT in column H
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,965
Members
449,201
Latest member
Jamil ahmed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top