• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Add prefix to multiple predefined cell ranges and joined two rows data

nbuddhi

Member
Dear Team,

There are 15000 entries in column K and there are set of predefined prefix in column N also range of cell to be filled with prefix located in column O. Help me to create a macro to copy and paste the prefix data (one prefix will be copied in to range mentioned in the next column) . Once prefix located in column L prefix value to be joined with column L value with space separator.

Thanks & Best Rgds,
nbuddhi.
 

Attachments

  • Data2.jpg
    Data2.jpg
    269.5 KB · Views: 10
The better is to attach a workbook with a before state sheet and accordingly the exact expected result worksheet …​
 
Dear Mark,

Thank you for your message. I just make a dummy report with few data. Prefix and cell range in column N & O just one input to 200 inputs. and it may varied report to report.

Thanks & Best Regds,
nbuddhi
 

Attachments

According to your attachment a VBA demonstration as a beginner starter :​
Code:
Sub Demo1()
    Dim R&
    For R = 2 To Cells(Rows.Count, 14).End(xlUp).Row:  Range(Cells(R, 15)) = Cells(R, 14):  Next
    Range("M2:M" & [K1].CurrentRegion.Rows.Count).Formula = "=CONCATENATE(L2,"" "",K2)"
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
Back
Top