Gordon Hughes
asked on
Marco to move data and remove balnk rows
I have an excel spreadsheet which is the result of exporting data from a crystal report
The crystal report has data from a sub report and apparently the following exists
"The export to Excel is designed to export the subreport to the "next" row. There is nothing you can do about that."
So is it possible to have a macro that puts the data under the correct headings and removes the blank rows
Have attached the excel file
Example the figures in row 3 should be in row 2 under the headings:- Reg Hrs Qty Reg Hrs Cost O/T Hrs Qty O/T Factor OT Hrs Cost Total Hrs Cost
Noting that some records do not contain data to move (example row 65)
Gordon
Test-Chargeable.xlsx
The crystal report has data from a sub report and apparently the following exists
"The export to Excel is designed to export the subreport to the "next" row. There is nothing you can do about that."
So is it possible to have a macro that puts the data under the correct headings and removes the blank rows
Have attached the excel file
Example the figures in row 3 should be in row 2 under the headings:- Reg Hrs Qty Reg Hrs Cost O/T Hrs Qty O/T Factor OT Hrs Cost Total Hrs Cost
Noting that some records do not contain data to move (example row 65)
Gordon
Test-Chargeable.xlsx
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Rgonzo1971
The macro seems to work well
How do I save it so that the macro can be seen and used where required on any excel spreadsheet
Gordon
The macro seems to work well
How do I save it so that the macro can be seen and used where required on any excel spreadsheet
Gordon
ASKER
In principle I like the idea of saving the data in the format required in a new spreadsheet. the solution from Norie converts the date format from English to American format
But still don't know how to save the macro so that is accessible from any excel spreadsheet
Gordon
But still don't know how to save the macro so that is accessible from any excel spreadsheet
Gordon
by creating a PERSONAL.xlsb file you can put the macros to be used in all the worksheets
the PERSONAL.xlsb is opened whenever excel is opening
so create a dummy macro like in the link then put the my code in the created module
the PERSONAL.xlsb is opened whenever excel is opening
so create a dummy macro like in the link then put the my code in the created module
Gordon
I didn't notice that about the date/times, I'll try and fix it and post back.
I didn't notice that about the date/times, I'll try and fix it and post back.
ASKER
Ok am getting there can we fix the date format on the second solution?
Gordon
Gordon
ASKER
Thanks Norie
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Norie
All looks good now
Gordon
All looks good now
Gordon
ASKER
Thanks all
Open in new window