Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks !
"Dave Peterson" wrote: I didn't notice you wanted it contiguous cells. I'd add a filter and show the non-blanks, but if that doesn't help: Option Explicit Sub testme() Dim myCell As Range Dim myRng As Range Dim DestCell As Range Dim myWord As String myWord = "house" With Worksheets("Sheet1") Set myRng = .Range("A1", .Cells(.Rows.Count, "A").End(xlUp)) Set DestCell = .Range("C1") End With For Each myCell In myRng.Cells With myCell If LCase(.Value) = LCase(myWord) Then DestCell.Value = .Value & .Offset(0, 1).Value Set DestCell = DestCell.Offset(1, 0) End If End With Next myCell End Sub andrei wrote: Thanks guys . Both functions work . I will try to manage with them . I prefered a macro that moves the concatenated results in a column as i explained in first post for the following reason : The cells i have to process from 2 columns are from something like A1B1 , A9B9 , A12B12 , A25B25 going to something like A10000B10000 ( without a clear pattern that i have content every 10th cell , it's random ) . That's why i needed the results to be one below another in same column ( say from C1 to C100 ) If a macro can be done , many thanks in advance -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
alphabetize entire rows by first word of first column | Excel Discussion (Misc queries) | |||
Need macro that concatenates cells with text | Excel Programming | |||
change first letter of a word for an entire column | Excel Discussion (Misc queries) | |||
How can you write a formula that searches for a particular word? | Excel Programming | |||
Getting valid web searches and avoiding sites that contaminate web searches | New Users to Excel |