Writing a macro that necessitates swapping ranges (but not entire rows). I need to swap ranges("i2:i19") and ranges("'i-1'2:'i-1'19") where i is a variable in a for loop that is iterating. How do I do this?
Writing a macro that necessitates swapping ranges (but not entire rows). I need to swap ranges("i2:i19") and ranges("'i-1'2:'i-1'19") where i is a variable in a for loop that is iterating. How do I do this?
Please Login or Register to view this content.
My General Rules if you want my help. Not aimed at any person in particular:
1. Please Make Requests not demands, none of us get paid here.
2. Check back on your post regularly. I will not return to a post after 4 days.
If it is not important to you then it definitely is not important to me.
What is range("'i-1'2:'i-1'19")
Ben Van Johnson
i is a variable that loops through a for loop and corresponds with a row number
No it's not. You have i inside single quotes inside double quotes. That's not VBA syntax. I'm trying to get you to explain your calculation in words. Post the whole code.
For instance, the i in: range("i2:i19") is not a variable. If you have a line:
Dim i
in your code somewhere, it has absolutely nothing to do with Range("i2")
Last edited by protonLeah; 06-20-2017 at 05:53 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks