Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy excel data to Notepad

Status
Not open for further replies.

gmoorthy

Programmer
Jul 13, 2004
107
US
I have about 10 columns and 300 rows which has formulas . I want to get the output of the formulas only into Notepad. Doing a cut paste is causing error to he fact that sometimes i miss data. Is there a easy way to do it . I am not conversant with macro
 
Hi,

You want the FORMULAS? Or you want the DATA?

Why not just SaveAs a text file of some sort?

All Notepad is is a text editor. Just open the text file in Notepad.
 
You can generate a string and write it to text file.
Generate strString looping through the range, add columns and rows separators according to your needs. Use Formula or FormulaLocal property to get formula text from a given cell.
To write strString string to strPathAndFileName file:
[pre]Dim intFileNum As Integer
intFileNum = FreeFile
' change Output to Append if you want to add string to existing file
Open strPathAndFileName For Output As intFileNum
Print intFileNum, strString
Close intFileNum[/pre]

combo
 
Sorry, I've noticed that this is not vba forum. So, no vba solution:
- insert macro sheet to your workbook,
- copy the range you plan to save as formulas and paste to macro sheet,
- copy data from macro sheet and paste to notepad.
Alternatively you can save macro sheet (after step 2) in one of available text formats (incl. csv).

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top