LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
mju mju is offline
external usenet poster
 
Posts: 29
Default Help with Concatenating

Please I need help! How do I make concatenated values a variable that I can
use any where in a current module? Is this the right way to use it as a
variable? Thanks alot guys

This is what I have so far€¦
sub concat()
L_Row = ActiveCell.SpecialCells(xlLastCell).Row
Set ST_loc_style_Color_Size = Range("ak2")
Set ST_loc_style_Color_Size_Pack = Range("ak2")
ST_loc_style_Color_Size.FormulaR1C1 =
"=CONCATENATE(RC[-23],""-"",RC[-10],""-"",RC[-9],""-"", RC[-8])"
ST_loc_style_Color_Size_Pack.FormulaR1C1 =
"=CONCATENATE(RC[-30],""-"",RC[-10],""-"",RC[-9],""-"", RC[-8],""-"",RC[-7])"
Range("ak2").FormulaR1C1 =
"=CONCATENATE(RC[-23],""-"",RC[-10],""-"",RC[-9],""-"", RC[-8])"

'ST_loc_style_Color_Size_Pack.FormulaR1C1 =
"=CONCATENATE(RC[-30],""-"",RC[-10],""-"",RC[-9],""-"", RC[-8],""-"",RC[-7])"

pack = MsgBox("Did you want include the pacl?", vbYesNo)

If pack = vbYes Then
ST_loc_style_Color_Size_Pack.autofill Destination:=Range("ak2:ak" & L_Row)
Range("AK2:AK" & L_Row).Copy
Range("AK1").pastespecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("AK2:AK" & L_Row).sort Key1:=Range("AK1"), Order1:=xlAscending,
header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("AL1").Select
Columns("AK:AK").AdvancedFilter action:=xlFilterCopy,
CopyToRange:=Range( _
"AL1"), Unique:=True
Total_Count = Application.WorksheetFunction.CountA(Range("AL:AL" ))
Else
ST_loc_style_Color_Size.autofill Destination:=Range("ak2:ak" & L_Row)
Range("AK2:AK" & L_Row).Copy
Range("AK1").pastespecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("AK2:AK" & L_Row).sort Key1:=Range("AK1"), Order1:=xlAscending,
header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("AL1").Select
Columns("AK:AK").AdvancedFilter action:=xlFilterCopy,
CopyToRange:=Range( _
"AL1"), Unique:=True
Total_Count = Application.WorksheetFunction.CountA(Range("AL:AL" ))

End If
end sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
concatenating TED Excel Worksheet Functions 3 February 13th 09 01:03 AM
concatenating Yosh Excel Discussion (Misc queries) 7 February 7th 07 09:03 PM
Concatenating % confused Excel Discussion (Misc queries) 2 September 21st 06 03:49 AM
Concatenating a zero T De Villiers[_39_] Excel Programming 6 July 21st 06 03:44 PM
Concatenating Himu Excel Programming 7 July 23rd 05 08:58 PM


All times are GMT +1. The time now is 11:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"