Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combine data in cells
Hi, I'm trying to write a macro that will combine the contents of 2 cells in
to one with a line feed between each. I tried to use vblf or chr(10) but it doesn't work. ActiveCell.Formula = "=$n$1&H5" & vbLf & "$0$1&H4" Any suggestions? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combine data in cells
You can use Alt + Enter to insert a manual line break, but I am not sure how
that would be coded in VB unless it would be SendKeys. "xgirl" wrote: Hi, I'm trying to write a macro that will combine the contents of 2 cells in to one with a line feed between each. I tried to use vblf or chr(10) but it doesn't work. ActiveCell.Formula = "=$n$1&H5" & vbLf & "$0$1&H4" Any suggestions? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combine data in cells
char(10) is same as Alt + Enter
Gord Dibben MS Excel MVP On Wed, 4 Oct 2006 17:00:03 -0700, JLGWhiz wrote: You can use Alt + Enter to insert a manual line break, but I am not sure how that would be coded in VB unless it would be SendKeys. "xgirl" wrote: Hi, I'm trying to write a macro that will combine the contents of 2 cells in to one with a line feed between each. I tried to use vblf or chr(10) but it doesn't work. ActiveCell.Formula = "=$n$1&H5" & vbLf & "$0$1&H4" Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
combine data in two cells into a third cell | Excel Worksheet Functions | |||
Combine cells with the same reference and combine quantities | Excel Discussion (Misc queries) | |||
Combine data that spans two rows, preserving cells? | Excel Discussion (Misc queries) | |||
Combine text data from 2 cells | Excel Discussion (Misc queries) | |||
How to combine 2 cells' data into 1 cell? | Charts and Charting in Excel |