calcutation

Yvonne Ng

Board Regular
Joined
Nov 5, 2013
Messages
67
Hi,
any one can help?

I've a list of different fruits, fruit A, fruit B, fruit C in worksheet 1 coloum A and with order date in Coloum B in dd-mm-yy (month in character), and coloum c, amount purchase for each order.
I need a formula in worksheet 2 that i can gather the different type of information, example, in coloum 1, the type of fruits I order for tat particular month, Mar, example. and also im coloum 2 how many times i order within the month of Mar. and coloum 3, total amount of fruits for tat particular type i order for the same month

however, example, in april, i did not order fruit A, but order fruit b, so in my april summary, it will not shown the fruit A apprear in my coloum 1 in worksheet 2 since i no place order in april

is there a way to do it? 
 
Thank you, Its Works.
But when i insert Fruit D in worksheet 1 into the month of Mar, Work sheet 2 did not capture this data.
why is it so?

In which row did you add The Fruit D record?

As I'll have different type of fruits order for different month, thus Worksheet 1 coloum 1 is also a variable

Please advise.

The formula system processes the fruits in column 1, i.e., column A. Am I missing something?
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,
I've add Fruit D in A7, 1-mar-13 in Colum B, and $ 30 in Coloum C in worksheet 1, but worksheet 2 does not capture the data.

I don't quite understand th formula, may I know which part of the formular is link to Worksheet 1 Coloum A, whch part of the formular is link to Worksheet 1 Coloum B, etc
 
Last edited:
Upvote 0
Hi,
I've add Fruit D in A7, 1-mar-13 in Colum B, and $ 30 in Coloum C in worksheet 1, but worksheet 2 does not capture the data.

The original data consists of 6 rows. You have added the Fruit D record outside that area. So, no wonder that the formulas do not see that record.

I don't quite understand th formula, may I know which part of the formular is link to Worksheet 1 Coloum A, whch part of the formular is link to Worksheet 1 Coloum B, etc

If you look at my reply, you'll see that Type reference Sheet1!A2:A6, Date Sheet1!B2:B6, and Amount Sheet1!C2:C6.

If we make the definitions of Type, Date, and Amount dynamic, we can freely add new records. The formulas will include such immediately.

Define Lrow as referring to:
Rich (BB code):
=MATCH(9.99999999999999E+307,Sheet1!$B:$B)

Type as:
Rich (BB code):
=Sheet1!$A$2:INDEX(Sheet1!$A:$A,Lrow)

Date as:
Rich (BB code):
=Sheet1!$B$2:INDEX(Sheet1!$B:$B,Lrow)

Amount as:
Rich (BB code):
=Sheet1!$C$2:INDEX(Sheet1!$C:$C,Lrow)

We keep formulas as is, posted earlier.

See:

https://dl.dropboxusercontent.com/u/65698317/aaCalculation with dynamic definitions Yvonne Ng.xlsx

Have a look at the dynamic definitions via Formulas | Name Manager.
 
Upvote 0
may i know where can i locate the Lrow formula? how to make definations of the type, date and amount?
 
Upvote 0
Thank you so much, Its finally works, appreciates if you could advise the formula to change to just only month instead if dd-mm-yy FOR wooksheet 2.
i try to change but not sure how
 
Upvote 0
Thank you so much, Its finally works, appreciates if you could advise the formula to change to just only month instead if dd-mm-yy FOR wooksheet 2.
i try to change but not sure how

Sheet2

A1: Mar (a literal month name)

A3, control+shift+enter and copy down:
Rich (BB code):
=IFERROR(INDEX(Type,SMALL(IF(FREQUENCY(IF(Type<>"",IF(Date-DAY(Date)+1=(1&$A$1)+0,
  MATCH(Type,Type,0))),ROW(Type)-ROW(INDEX(Type,1,1))+1),ROW(Type)-ROW(INDEX(Type,1,1))+1),
  ROWS(A$3:A3))),"")

B3, just enter and copy down:
Rich (BB code):
=IF($A3="","",SUMPRODUCT(--(Type=$A3),--(Date-DAY(Date)+1=(1&$A$1)+0)))

C3, just enter and copy down:
Rich (BB code):
=IF($A3="","",SUMPRODUCT(Amount,--(Type=$A3),--(Date-DAY(Date)+1=(1&$A$1)+0)))
 
Upvote 0
I would have thought that this problem lent itself to a PivotTable rather than a formulaic solution.
 
Upvote 0

Forum statistics

Threads
1,215,544
Messages
6,125,438
Members
449,225
Latest member
mparcado

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