Error in pasteValues,xladd

farhan_babu

New Member
Joined
Nov 19, 2005
Messages
13
Hi,

I have written following code to get datewise sales total but there is any discrepency in this code.The 15 day of the month,s sales doesn,t appear.Is there any suggestion for this.Workbook has heavy data so I can,t attached it.


VBA:

Sub DaywiseSummary()
Application.ScreenUpdating = False

Dim i As Integer
'Dim COL As Integer
Dim ROO As Long
Dim ds As Date

' On Error Resume Next
'No of Required Sheets
For i = 1 To 13
ROO = 2
Sheets(i).Select
'First date of Month
ds = Range("A8")
Do
Sheets(i).Range("A1:A100").Find(What:=(ds), After:=Sheets(i).Cells(1, 1), LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Activate
MsgBox ds
ActiveCell.Offset(0, 12).Select
Selection.Copy
'Summary Sheet
Sheets("Sheet1").Activate
'Date Column in Summary Sheet
Cells(ROO, 1) = ds
'Total Sales for the Day in Summary Sheet
Cells(ROO, 2).PasteSpecial xlPasteValues, xlAdd
Application.CutCopyMode = False
ROO = ROO + 1
ds = ds + 1
Sheets(i).Select
Loop Until Month(Sheets(i).Range("A8")) < Month(ds)
Next
Sheets("Sheet1").Activate
End Sub

Thanks in advance.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,225,071
Messages
6,182,687
Members
453,132
Latest member
nsnodgrass73

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