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: 12
Default Need help in merging cells together


I need a script to use in order to merge 4 different cells together that are
not listed next to each other on the same worksheet. My objective is to
create a unique identifier with the merging of these 4 cells together to
match up against another cell on another workbook. I haven't done much in
merging using VBA and have a script listed below for someone to review and
provide feedback as to where I am going wrong:

Sub Import()
Dim shtSup1 As Worksheet
Dim field1 As Range, field2 As Range, field3 As Range, field4 As Range,
Rng As Range, rngPaste As Range
Set field1 = Range("F44:F53")
Set field2 = Range("H44:H53")
Set field3 = Range("D44:D53")
Set field4 = Range("B44:B53")
Set rngPaste = Range("S44:S53")
Set Rng = Union(field1, field2, field3, field4)
Rng.Copy Destination:=rngPaste
End Sub

So far, I have joined these cells together, however, I need for them to be
merged together instead of unioned and the results to pasted in the fields
S44:S53.
Thanks-
Neecy

 
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
merging cells and eliminating spaces for empty cells Jill Excel Discussion (Misc queries) 2 April 2nd 10 07:43 PM
Formula for merging cells/re sizing cells Mathicas Excel Discussion (Misc queries) 1 September 29th 08 08:16 PM
merging cells together but keeping all data from the cells Pete C[_2_] Excel Discussion (Misc queries) 3 May 16th 08 10:14 PM
Merging Cells David New Users to Excel 24 September 2nd 06 08:36 PM
Merging cells stuart Excel Worksheet Functions 3 January 7th 05 04:34 PM


All times are GMT +1. The time now is 10:46 AM.

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"