Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
merge text
I have a spreadsheet that was created by another person.
They have broken sentences into individual cells Sort of like this this continues for several hundred lines and I have to maintain it! I've played with =concatenate and a couple of other things but what I really nees is to figure out a macro that takes the current selection (say b1:b6) and concatenates it into b1 (ie: b1 = b1&b2&b3&b4&b5&b6) - I know how to add spaces etc but thats is a secondary concern. The number of cells to add together is always different but they are always in columns. I have played with snippets of code and such and could probably make this work if I had a couple of weeks to understand the model (I'm new to this - did you guess?) but this must be something someone has come across before? Can anyone point me at some code or ideas that will give me a jump start? TIA Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
merge text
function GetText(rng as range) as string
dim c as range, v as string for each c in rng if c.value<"" then v=v & iif(v="",""," ") & c.value next c GetText=v end function -- Tim Williams Palo Alto, CA "Reg" wrote in message ... I have a spreadsheet that was created by another person. They have broken sentences into individual cells Sort of like this this continues for several hundred lines and I have to maintain it! I've played with =concatenate and a couple of other things but what I really nees is to figure out a macro that takes the current selection (say b1:b6) and concatenates it into b1 (ie: b1 = b1&b2&b3&b4&b5&b6) - I know how to add spaces etc but thats is a secondary concern. The number of cells to add together is always different but they are always in columns. I have played with snippets of code and such and could probably make this work if I had a couple of weeks to understand the model (I'm new to this - did you guess?) but this must be something someone has come across before? Can anyone point me at some code or ideas that will give me a jump start? TIA Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to add text to all cells in excel or merge the text in two ce | Excel Discussion (Misc queries) | |||
text outside merge cells despite clicking wrap text | Excel Worksheet Functions | |||
I cannot see all of my text when I merge cells. | Excel Discussion (Misc queries) | |||
Help for VBA Text Merge | Excel Discussion (Misc queries) | |||
How do I merge new text into existing text cells. | Excel Discussion (Misc queries) |