View Full Version : Gather a group of cells in a single cell based on a condition
mahmoud-lee
01-29-2014, 01:50 AM
Explanation inside the Sheet
p45cal
02-11-2014, 07:35 PM
a little macro?:
Sub blah()
lr = Cells(Rows.Count, "B").End(xlUp).Row
For rw = lr To 3 Step -1
If Len(Cells(rw, 1).Value) = 0 Then
Cells(rw - 1, 2).Value = Cells(rw - 1, 2).Value & vbLf & Cells(rw, 2).Value
Rows(rw).Delete
End If
Next rw
End Sub
works on the active sheet and deletes rows so test on a copy first.
mahmoud-lee
02-11-2014, 08:06 PM
Thank you very much for your effort
But I want it by the formula
p45cal
02-11-2014, 08:31 PM
There is no straightforward formula that I can think of to do this. (While I'm there, there is no complex formula that I can think of to do this either.)
It may be possible with a user defined function, but that would involve VBA too.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.