LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Concatenate Macro

I am trying to concatenate A1:M1 into N1 using this macro

Dim Variable1 As Long
Dim Variable2 As Range
Set sht = Sheets("Data")
Variable1 = sht.Cells(Cells.Rows.Count, "A").End(xlUp).Row
Set MyRange = sht.Range("A1:A" & Variable1)
For Each Variable2 In MyRange
Variable2.Offset(, 13) = Variable2 & Variable2.Offset(, 1) &
Variable2.Offset(, 2)
Next

I am having two problems
1. Only A1:B1 are concatenating into N1
2. A1 and F1 have percentages inside them. When A1 concatenates (F1 will
have same problem) any numbers after the decimal point are showing up in the
concatenated cell. I only want the numbers before the decimal point to
display for A1 and F1.

I dont know how to fix either problem. If you can you offer any
instruction thank you.

 
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
Concatenate using Macro Gaura215 Excel Discussion (Misc queries) 0 February 9th 11 02:07 PM
CONCATENATE IF macro or function? FJ Excel Programming 3 October 17th 08 11:07 AM
Concatenate Macro Dan R. Excel Programming 1 January 4th 07 09:49 PM
Concatenate Macro osaka78 Excel Discussion (Misc queries) 6 April 9th 06 01:34 PM
Concatenate Macro mully Excel Programming 11 January 4th 06 05:05 PM


All times are GMT +1. The time now is 01:41 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"