Related:
- Excel macro to merge cells based on condition
- Based on the values in cells b77 b81 ✓ - Excel Forum
- Merge rows if it meets criteria in Excel ✓ - Excel Forum
- Excel date format dd.mm.yyyy - Guide
- Excel conditional formatting if another cell contains specific text ✓ - Excel Forum
- Excel macro to create new sheet based on value in cells - Guide
3 replies
Hi Towa,
Thank you for the solution, it worked but I think it always require a manual intervention but would it be possible for you to provide me a function/macro where we can have a <function key> that does this automatically on selected range, where the last cell on the selected list should be the destination of the previous cells. Offcourse including the destination at the end.
The reason I requested this function/macro is because I have a very huge list of items to be merged, and the biggest challange is that these range in not fix.
Hope my above request is understood.
Thank you,
Best Regards - AD
Thank you for the solution, it worked but I think it always require a manual intervention but would it be possible for you to provide me a function/macro where we can have a <function key> that does this automatically on selected range, where the last cell on the selected list should be the destination of the previous cells. Offcourse including the destination at the end.
The reason I requested this function/macro is because I have a very huge list of items to be merged, and the biggest challange is that these range in not fix.
Hope my above request is understood.
Thank you,
Best Regards - AD
Hi AD,
Here is the macro:
You can assign a <function key> if you like by pressing Alt+F8 and selecting options (bottom right of the window).
You will still need to select all the destination cells manually and run the macro after each one, but it goes a lot faster then the previously provided function.
The best way I found for doing this is to select all the destination cells and use ENTER to toggle between them. So select cells, run macro (using function key), hit enter, run macro, enter, macro, enter .... etc..
Unfortunately my limited VB knowledge doesn't allow me to write a code where you will only need to run the macro once after selecting all the destination cells.
Best regards,
Trowa
Here is the macro:
Sub test() ActiveCell.Value = ActiveCell.Offset(-4, 0).Value & "-" & ActiveCell.Offset(-3, 0).Value & "-" & ActiveCell.Offset(-2, 0).Value & "-" & ActiveCell.Offset(-1, 0).Value & "-" & ActiveCell.Offset.Value End Sub
You can assign a <function key> if you like by pressing Alt+F8 and selecting options (bottom right of the window).
You will still need to select all the destination cells manually and run the macro after each one, but it goes a lot faster then the previously provided function.
The best way I found for doing this is to select all the destination cells and use ENTER to toggle between them. So select cells, run macro (using function key), hit enter, run macro, enter, macro, enter .... etc..
Unfortunately my limited VB knowledge doesn't allow me to write a code where you will only need to run the macro once after selecting all the destination cells.
Best regards,
Trowa