Good morning friends. I am hoping that one of you can help me. I have an excel spreadsheet that is just two columns (A and B) I would like to have them transposed into a text Document when I click a button (already made and I can assign macro) All I need is a code to do it. So far I've only been able to get the column A to transpose but cannot figure out how to include column B.
Here is what I have:
Sub NotePadByTab()
Dim ws As Worksheet
Dim FF
Dim I As Long
For Each ws In ThisWorkbook.Worksheets
I = I + 1
arr = ws.Range("A1:A20")
arr = Application.WorksheetFunction.Transpose(arr)
arr = Join(arr, vbCrLf)
FF = FreeFile
Open "C:\Users\staff\Desktop\untitled.txt" & I & ".txt" For Output As #FF
Print #FF, arr
Close #FF
Next ws
End Sub
I also have a few questions:
Would this still work with a drop down menu?
Is there a way that wouldn't require the 'untitled' file and it just creates a new file from nowhere?
Mr.excel is a great tool and I thank everyone who contributes.
Best,
Seth Barradas