I created a macro called Switch to switch two numbers located in adjoining cells (one above the other). My problem is that I want the switch to occur based on whichever cell I have highlighted so that it switches the number in that cell with the number in the cell one row below it. Instead the macro only switches whatever data is in the cells originally used when I created the macro.
' Switch Macro
' Switches two prices
' Keyboard Shortcut: Ctrl+Shift+S
Application.CutCopyMode = False
Can someone please show me how to modify the macro so that it works based on the highlighted cell and not a fixed cell? Thanks!
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210 (2 * 3 * 5 * 7) or 2310 (2 * 3 * 5 * 7 * 11).
The larger templa…