How to show a specific column
Closed
ashish.neharkar
Posts
1
Registration date
Monday 16 January 2017
Status
Member
Last seen
16 January 2017
-
16 Jan 2017 à 00:56
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 - 16 Jan 2017 à 05:52
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 - 16 Jan 2017 à 05:52
Related:
- How to print specific columns in excel
- How do i find a specific video on youtube - Guide
- How to change date format in excel - Guide
- Excel mod apk for pc - Download - Spreadsheets
- How to clear formatting in excel - Guide
- Arrow keys not working in excel - Guide
1 response
vcoolio
Posts
1411
Registration date
Thursday 24 July 2014
Status
Contributor
Last seen
6 September 2024
262
16 Jan 2017 à 05:52
16 Jan 2017 à 05:52
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.