concatenate variables

Linda21

New Member
Joined
Aug 2, 2010
Messages
38
Can someone review the code below? I simply want to concatenate all 3 variables into one string--no spaces. There is something wrong with the last line of code. Also, should these be Variants if they are all text? Thank you!

SDDF_StartRow = 10
SDDF_FundCol = 2
SDDF_EntityCol = 3
SDDF_CodeCol = 7
D_StartRow = 9
D_FundCol = 33
D_EntityCol = 34 'will change depending on detail sheet
D_CodeCol = 32
D_EntityRow = 5
SDDF_Fund = SDDF.Cells(SDDF_StartRow, SDDF_FundCol) 'designate SDDF fund location
D_Fund = RD.Cells(D_StartRow, D_FundCol) 'designate detail sheet fund location
SDDF_Entity = SDDF.Cells(SDDF_StartRow, SDDF_EntityCol) 'designate SDDF entity location
D_Entity = RD.Cells(D_EntityRow, D_EntityCol) 'designate detail sheet entity location - does not change
SDDF_Code = SDDF.Cells(SDDF_StartRow, SDDF_CodeCol) 'designate SDDF detail code location
D_Code = RD.Cells(D_StartRow, D_CodeCol) 'designate detail sheet detail code location
SDDF = SDDF_Fund & SDDF_Entity & SDDF_Code
 
I figured it out. I had a sheet named SDDF - and was trying to use SDDF as a variable. Thank you for your help. Do you have any suggestions for materials to help learn the basics? MrExcel sells some packages, are there any other helpful materials?
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Sorry, I am completely self-taught from trial and error and this board. Maybe someone else will recommend.
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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