Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
merging cells/data using a Macro
I have a 6,000-line macro. At a certain point, I need to merge data from
various cells into other cells. I want to merge (append?) data/text from cells B1 and C1 onto existing text in A1 but then delete B1 and C1 so that A1 "stretches" across that range (A1:C1). I never know what the actual data/text will be in the cells, though. So, let's say that: A1 contains the words "I like" B1 contains the words "chocolate" and C1 contains the words "ice cream." I want to end up with "I like chocolate ice cream" in Cell A1 and, in effect, delete the text in B1 and C1 so that A1's text "carries over" into those cells. Or, after joining (?) the data, merge A1, B1, and C1. Of course, I can do it manually and "record a macro" but it records the actual words but that won't work in real life because the words/text are always different. Thanks, in advance. Dan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
merging cells/data using a Macro
Look at the text function concatenate - this can be used to link any number
of cells together in a contigiuos string "crimsonkng" wrote in message ... I have a 6,000-line macro. At a certain point, I need to merge data from various cells into other cells. I want to merge (append?) data/text from cells B1 and C1 onto existing text in A1 but then delete B1 and C1 so that A1 "stretches" across that range (A1:C1). I never know what the actual data/text will be in the cells, though. So, let's say that: A1 contains the words "I like" B1 contains the words "chocolate" and C1 contains the words "ice cream." I want to end up with "I like chocolate ice cream" in Cell A1 and, in effect, delete the text in B1 and C1 so that A1's text "carries over" into those cells. Or, after joining (?) the data, merge A1, B1, and C1. Of course, I can do it manually and "record a macro" but it records the actual words but that won't work in real life because the words/text are always different. Thanks, in advance. Dan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
merging cells/data using a Macro
Sorry for taking up bandwith but, omigod, thanks Andi, that's awesome. Works
perfectly! Shame on me for not knowing that. Thanks a lot! "Andibevan" wrote: Look at the text function concatenate - this can be used to link any number of cells together in a contigiuos string "crimsonkng" wrote in message ... I have a 6,000-line macro. At a certain point, I need to merge data from various cells into other cells. I want to merge (append?) data/text from cells B1 and C1 onto existing text in A1 but then delete B1 and C1 so that A1 "stretches" across that range (A1:C1). I never know what the actual data/text will be in the cells, though. So, let's say that: A1 contains the words "I like" B1 contains the words "chocolate" and C1 contains the words "ice cream." I want to end up with "I like chocolate ice cream" in Cell A1 and, in effect, delete the text in B1 and C1 so that A1's text "carries over" into those cells. Or, after joining (?) the data, merge A1, B1, and C1. Of course, I can do it manually and "record a macro" but it records the actual words but that won't work in real life because the words/text are always different. Thanks, in advance. Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
merging cells and not losing data | Excel Worksheet Functions | |||
merging cells together but keeping all data from the cells | Excel Discussion (Misc queries) | |||
Merging Cells that contain data anomaly | Excel Discussion (Misc queries) | |||
Merging Cells with Data In Them | Excel Discussion (Misc queries) | |||
merging data cells | Excel Discussion (Misc queries) |