How to exclude the value 0,00 or 0.00 from being copied

Romano_odK

Active Member
Joined
Jun 4, 2020
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

Using this code I can copy values from one column to another. Now I would like to exclude the values 0,00 or 0.00 from being copied. Can this be done?

Thank you for your time.

Romano

Range("D9", Cells(Rows.Count, "D").End(xlUp)).Copy

Worksheets("OPXML").Range("C9").PasteSpecial Paste:=xlPasteValues, SkipBlanks:=False
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Not knowing how your data looks like, but you could do a filter first. Make sure you data has a header in D9

VBA Code:
Sub jec()
 Application.ScreenUpdating = False
 With Range("D9", Cells(Rows.Count, "D").End(xlUp))
   .AutoFilter 1, "<>0.00", xlAnd, "<>0,00"
   .Offset(1).Copy
    Sheets("OPXML").Range("C9").PasteSpecial xlPasteValues
   .AutoFilter
 End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,212
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top