Sep 28 2017
10:17 AM
- last edited on
Jul 25 2018
09:40 AM
by
TechCommunityAP
Sep 28 2017
10:17 AM
- last edited on
Jul 25 2018
09:40 AM
by
TechCommunityAP
Hello to everybody,
I would like to ask for your help.
I have in a table all the record of the sales. I need to know the amount sold between certian dates and in an specific currency, I have a table in which in column E is the amount of the transaction, in column F the currency (USD, EUR, etc) and in column I the date of the transaction.
At this moment, I use a Macro to give me the amount of sells made in an specific currency. The problem is when I want it to just sum the transaction that were done between certain dates (for example beteen January 1st and January 15).
The macro is:
Sub SumaDato()
Dim i, j As Integer
Dim filas As Integer
Dim Currency As String
Dim Suma As Double
Currency = Range("curr")
Suma = 0
For i = 3 To Worksheets.Count
filas = Worksheets(i).Cells(Rows.Count, 1).End(xlUp).Row
For j = 2 To filas
If Worksheets(i).Cells(j, 6) = Currency Then
Suma = Suma + Worksheets(i).Cells(j, 5).Value
End If
Next j
Next i
Range("total").Value = Suma
End Sub
Thank You
Oct 02 2017 03:17 AM
Oct 03 2017 10:31 AM
I forgot to tell that there is the same table, but with different information for each of the stores. Each store is each page of the book.