NoviceSeekingHelp
New Member
- Joined
- Mar 17, 2012
- Messages
- 4
Hi While having a reasonable understaning of excel, when it comes to VBA, I am a complete novice. I am attempting to use a macro to do what I hoped was going to be a simple task, but have run up against a stumbling block which I am sure one the of the guru's here will be able to solve in less than 5 seconds without raising a sweat. The problem I have is, I am using this very very basic code to export data from an excel sheet to a csv file Sub ExportTransactionsIntoACSVFile() ' ExportTransactionsIntoACSVFile Macro Sheets("Export").Select Range("A1:M43").Select Selection.Copy Workbooks.Add Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=True, Transpose:=False Application.CutCopyMode = False ActiveWorkbook.SaveAs Filename:= _ "D:\ExportFile.csv", _ FileFormat:=xlCSV, CreateBackup:=False ActiveWindow.Close Sheets("Sheet1").Select Range("F8").Select End Sub In a neolithic way, it does the job, however, what I would like to do is export only the dynamically generated rows that contain values, not the range A1:M43. Is there a genius out there who can edit my macro to ensure the code only exports the rows that contain data, (not rows that contain formulas)? Huge thanks in advance.
Last edited: