Hello. I copied the following macro in my excel sheet but I don't know how to apply it.
Dim rngcell As Range
For Each rngcell In Range("testrng")
With rngcell
.Copy .Offset(0, 1)
End With
Next rngcell
Hello. I copied the following macro in my excel sheet but I don't know how to apply it.
Dim rngcell As Range
For Each rngcell In Range("testrng")
With rngcell
.Copy .Offset(0, 1)
End With
Next rngcell
You are looping through a named range "testrng" and copying each cell to the right of the named range cell, but nothing else. Where are you pasting the copy cell in to?
Someone else made that code for me. My goal was to create a range with non-continguous cells in it. And then select the exact same cells in the adjacent column. I don't need to do any pasting. I just want to select. Regardless, I can't even get the macro to run. It doesn't appear in my macro list. I copied it into a new module under this workbook, saved as macro enable, but when I press Run nothing shows up. So, I guess I have two problems.
Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.
Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
(This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
(This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Your post does not comply with Rule 7 of our Forum RULES. Please do not ignore requests by Administrators, Moderators and senior forum members regarding forum rules.
If you are unclear about the request or instruction then send a private message to them asking for clarification. Do not post a reply in a thread where a moderator has requested an action that has not yet been complied with e.g Title change or Code tags...etc
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks