Posts

Showing posts from November, 2018

How to swap 2 excel ranges | swap with multiple cells selected

I had created a macro to swap 2 cells values in MS Excel. By just clicking a button a macro could interchange the content of 2 excel cells.  There was a limitation on that macro. It could only work only if the selection is just 2 cells. It could interchange the value of just 2 cells but not the ranges. I used to get a lot of request from my viewers to extend this macro for more than 1 cell. Due to time constraint, I could not work on it. Excel VBA macro to swap 2 values in cells Now, I have written another macro which will work on the Excel ranges. This macro is completely different. My original macro was based on area selection. But the new macro is based on the ranges. It is very small and easy to understand, unlike another macro, which is comparatively bigger. I will explain each of the lines in the macro. Check out my youtube channel for more amazing excel and office automation videos My youtube channel 1. Sub swap_2_ranges() 2. string_all_selected_...