how to combine two coloums while the rows are not serial

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
coloum 1 coloum 2 coloum 3 must have
what is in 1+2
c1 c2 c3
row 1 a d ad
row 4 b c bc
row 10 c b cb
row 15 d a da

this must be done with one time for all rows together
Would a VB solution be acceptable? Here is a macro that should do what you want...
Code:
Sub SkippedRowsConcatenate()
  Dim R As Range
  For Each R In Columns("A").SpecialCells(xlCellTypeConstants)
    R.Offset(0, 2).Value = R.Value & R.Offset(0, 1).Value
  Next
End Sub
If you are new to macros, they are easy to install. From any worksheet, press ALT+F11 to go into the VB editor; once there, click Insert/Module from its menu bar and copy paste the above code into the code window that opened up. That's it... you are done. Go back to the worksheet with your data on it and press ALT+F8 to bring up the macro dialog box; select SkippedRowsConcatenate from the list and click the Run button.
 
Upvote 0
That sounds like you ran some code prior to running mine and it didn't run to completion for some reason. If so, that would mean you are still in break mode. In the VB editor, try clicking Run/Reset from its menu bar and then try running my macro again and see if it works then. Just so you know, I tested the code before I posted it and it worked on my sample data (constructed from what you posted).
 
Upvote 0
i will try that but i want to explain what i want to do i have this excel sheet there is a filter operated to get a certain word filtered
then i have the filtered sheet with many coloums and rows like row a1, a6, a10, a100
then i want to add two coloums while the sheet is still on filter ,new coloum =a1&b1
but this can not be copy pasted along the whole sheet it will be segemented and will be done in one step for every segment
now i want to do all the segemnts in one go this is my qestion
 
Upvote 0

Forum statistics

Threads
1,225,152
Messages
6,183,199
Members
453,151
Latest member
Lizamaison

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top