LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Macro to concatenate columns

Oops sorry. How are you deciding which combinations go in which cells? Is
there a method? It appears you are cycling through C, then B, then A. In
which case, you would be using a nested For loop.

Sub Loops
OutputCell=1

For A=1 to 3
OutPutA=cells(A,1).value & ""
For B=1 to 3
OutPutB=cells(B,2) .value & ""
For C=1 to 3
OutPutC=cells(C,3).value & ""
FinalOutPut=OutPutA & OutPutB & OutPutC
cells(OutputCell,4).value=FinalOutPut
OutputCell=OutputCell+1
Next C
Next B
Next A

End Sub

That should do the trick based on the initial posting.


"joel" wrote:


Re-Read the request. the results isn't one formula per row, the user
wants every combination.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161009

Microsoft Office Help

.



 
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 for multiple columns richard Felix Excel Discussion (Misc queries) 3 May 28th 11 11:53 PM
CONCATENATE TWO COLUMNS The Cable Guy Excel Worksheet Functions 3 December 16th 09 04:37 AM
Concatenate two columns? uma Excel Worksheet Functions 1 April 19th 06 09:46 AM
Concatenate 3 columns. Jim15[_12_] Excel Programming 0 February 23rd 06 05:08 PM
Concatenate 3 columns. Jim15[_13_] Excel Programming 0 February 23rd 06 05:00 PM


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