Concatenate with Macro

Ody

Board Regular
Joined
Oct 14, 2010
Messages
215
Hello all,

I'm trying to get my concatenate macro to work but I'm running into issues because the range is always on my last sheet. I'm trying to modify the following code unsuccessfully:

'reference headliners from last worksheet to summary sheet
lMaxRows = .Cells(.Rows.Count, "j").End(xlUp).Row
.Range("j" & lMaxRows + 1).Formula = "='" & LastSheet & "'!bx7" & LastSheet "'!bx8"

I can't figure out how to always point my macro to the last sheet then combine the two cells I want in my summary.

When I use the macro recorder I get this:
"=CONCATENATE('11-1111'!R[-9]C[72],CHAR(10),CHAR(10),'11-1111'!R[-8]C[72])"


Many thanks for any help.
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,224,544
Messages
6,179,430
Members
452,915
Latest member
hannnahheileen

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