How to show a specific column
Closed
ashish.neharkar
Posts
1
Registration date
Monday January 16, 2017
Status
Member
Last seen
January 16, 2017
-
Jan 16, 2017 at 12:56 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Jan 16, 2017 at 05:52 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Jan 16, 2017 at 05:52 AM
Related:
- How to show specific columns in excel
- Number to words in excel - Guide
- How to take screenshot in excel - Guide
- How to find specific words on a page - Guide
- How to change author in excel - Guide
- How to open excel in notepad - Guide
1 response
vcoolio
Posts
1411
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 6, 2024
262
Jan 16, 2017 at 05:52 AM
Jan 16, 2017 at 05:52 AM
Hello Ashish,
See if the following code does the task for you:-
I have created a sample work book for you to peruse at the following link:-
https://www.dropbox.com/s/s1433antvvflgkl/Move%20selected%20columns%20to%20sht2..xlsm?dl=0
There is a red button just after Column Z. Click on the button and then check sheet2 to see if the correct columns have been copied over.
I hope that this helps.
Cheerio,
vcoolio.
See if the following code does the task for you:-
Option Explicit Sub MoveCols() Dim ar As Variant Dim var As Variant Dim ws As Worksheet, ws1 As Worksheet Set ws = Sheet1 Set ws1 = Sheet2 ar = ws.Range("A1", ws.Range("Z" & Rows.Count).End(xlUp)) var = Application.Index(ar, Evaluate("row(1:" & ws.[A1].CurrentRegion.Rows.Count & ")"), Array(1, 8, 19, 20, 22)) ws1.Range("A1:E" & UBound(var)) = var End Sub
I have created a sample work book for you to peruse at the following link:-
https://www.dropbox.com/s/s1433antvvflgkl/Move%20selected%20columns%20to%20sht2..xlsm?dl=0
There is a red button just after Column Z. Click on the button and then check sheet2 to see if the correct columns have been copied over.
I hope that this helps.
Cheerio,
vcoolio.