New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Export non Zero data to another Workbook

Macros, VBA, Excel Automation, etc.

Export non Zero data to another Workbook

Postby iczy » Sat Jan 14, 2012 11:46 pm

Hello,

I have two worksheets:
1) Raw data (number of rows variable)
2) Data to export

On worksheet 2, I have IF formulas so that if there's no data on the cell in Sheet 1, 0 or " " value returns - Since I dont know how many rows Raw data might have.

Now the problem is, how could I export Sheet 2 to another Excel or CSV file, so that the null values are not included? It creates a problem to the system I'm trying to upload since it read those lines that I dragged the IF formulas down in Sheet 2.

I attached a sample of my file.
Thank you for the help.
  • 0

You do not have the required permissions to view the files attached to this post.
iczy
Rookie
 
Posts: 1
Joined: Jan 14, 2012
Reputation: 0

Re: Export non Zero data to another Workbook

Postby Sisyphus » Sun Jan 15, 2012 2:59 am

Hi,
Have tried Autofilter? It should be possible to filter out the zero items and save the remainder to another workboo or sheet.
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010

Re: Export non Zero data to another Workbook

Postby Sisyphus » Sun Jan 15, 2012 3:59 am

Hi,
I looked at your file now and wonder about the use of your sheet 2. You are copying data of Text format. Well, apparently the data you get are in Text format, so no harm is done, but I might suggest a better formula if I would have a better understanding of what, exactly, you are trying to do. If the purpose is to eliminate blanks my earlier suggestion could be worked on Sheet 1 and you would never need any formulas and never have any blank rows in Sheet 2.

On the other hand, if you are satisfied with the performance of your Sheet 2 and all you want is to remove formulas that return no data you may try to Copy and Paste Special / Values. That would replace all formulas with their values, meaning, if the value a formula returns is a blank you get a real blank. If you then need a way to remove the blanks or zeros you can use Autofilter to do the job.
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010


Return to Macros and VBA Questions

Who is online

Users browsing this forum: Google [Bot] and 251 guests