Macro to combine cells

flexfanatic

New Member
Joined
Apr 4, 2011
Messages
3
Yesterday someone was able help me "iron out" a formula to combine cells and add some text.

Now I would like to automate it with a macro (Excel 2007). For example I have.

="http://www.shoppingbuddy.net/"&A2&"~"&B2&"/"&C2&"~"&D2&".htm" which pulls text from different cells and combines it into a cell of my choice.

Now I need to apply this to all cells in the worksheet (e.g., =[URL="http://www.shoppingbuddy.net/"&A3&"~"&B3&"/"&C3&"~"&D3&".htm"]http://www.shoppingbuddy.net/"&A3&"~"&B3&"/"&C3&"~"&D3&".htm[/URL] , =[URL="http://www.shoppingbuddy.net/"&A4&"~"&B4&"/"&C4&"~"&D4&".htm"]http://www.shoppingbuddy.net/"&A4&"~"&B4&"/"&C4&"~"&D4&".htm[/URL] and so on)

It's over 50,000 rows so you may understand why I need to have a macro
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
  • Put your formula in a cell. For this example, say it's cell E2.
  • Then in the Name box, just to the left of the formula bar, type in E2:E50000 and Enter. That will select those cells.
  • Then Ctrl+D on the keyboard will autofill your formula down within the selected cells.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,876
Members
452,949
Latest member
Dupuhini

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