Copying Columns to each notepad

xsdip

New Member
Joined
May 21, 2019
Messages
32
I am very new to excel VBA. I have learned the basics of VBA programing language. Could you please anyone help me in this.

Assuming I have numbers in F9 to F208996 and G9 to G330571 etc.

How do I capture these numbers and convert it into separate nodepad files. i.e. I mean to say, F column datas in one textpad and G column datas in another textpad etc.

In figure below, I need to capture the bold numbers. The columns to be converted to each notepad are F,G,H,I always. The row to be converted to notepad starts always from 9th row till lot of numbers

1638904019048.png


I have made a rough code. But not sure how to write loop.

Sub Export()
Dim lastrow As Long
Dim lastcolumn As Long
Dim i As Integer, j As Integer

lastrow = Cells(1, "A").End(xlDown).Row
lastcolumn = activesheets.Cells(1, Column.Count).End(xlToLeft).Column

For i = 1 To lastrow
For j = 1 To lastcolumn



Next j
Next i


End Sub
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,224,525
Messages
6,179,317
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top