Index Match formula or one better that solves this problem ....(No VBA)

gotido

New Member
Joined
Dec 13, 2017
Messages
41
Office Version
  1. 365
Platform
  1. MacOS
Hello,

I´m trying to create a file where I can put data that I export from a company software, which gives me the sales items for each commercial and the value.

In a table I would like to get the values of each item, that correspond to a specific commercial and that the item is placed in the sales dates.
The sales that coincided with Q1 would be in Q1 and the same for Q2.
All sales outside of these dates would be in the other sales.

Is this possible using just formulas?
 

Attachments

  • Captura de ecrã 2022-08-22, às 19.58.40.png
    Captura de ecrã 2022-08-22, às 19.58.40.png
    183.3 KB · Views: 10

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Any chance that you could give us the sample data with XL2BB so that we can easily copy to test with?
 
Upvote 0
Hi,

Something like this:
Book1
ABCDEFGHIJ
1NameItemSaleDateSalesman 11Q2Q Other Dates
2Salesman 1ball101-8-2022Item1-8-202216-8-2022
3Salesman 1skate1216-8-2022ball101614
4Salesman 2bike151-8-2022skate0120
5Salesman 3skate111-8-2022
6Salesman 4skate102-8-2022
7Salesman 1ball1410-8-2022
8Salesman 1ball1616-8-2022
9Salesman 2bike121-8-2022
10Salesman 3skate1416-8-2022
11Salesman 4skate1616-8-2022
Sheet2
Cell Formulas
RangeFormula
G3:G4G3=UNIQUE(FILTER(B2:B11,A2:A11=G1))
H3:I4H3=IFERROR(SUM(FILTER($C$2:$C$11,$A$2:$A$11&$D$2:$D$11&$B$2:$B$11=$G$1&H$2&$G3)),0)
J3:J4J3=IFERROR(SUM(FILTER($C$2:$C$11,$A$2:$A$11&$B$2:$B$11=$G$1&$G3)),0)-SUM(H3:I3)
Dynamic array formulas.
 
Upvote 0
Solution
@jorismoerings
  • Thanks for creating the data.
  • There is no need for IFERROR in your formula as FILTER allows for a value if nothing is returned from the FILTER. For example, instead of H3 being
    =IFERROR(SUM(FILTER($C$2:$C$11,$A$2:$A$11&$D$2:$D$11&$B$2:$B$11=$G$1&H$2&$G3)),0) it could be
    =SUM(FILTER($C$2:$C$11,$A$2:$A$11&$D$2:$D$11&$B$2:$B$11=$G$1&H$2&$G3,0))
Another set of options

22 08 23.xlsm
ABCDEFGHIJ
1NameItemSaleDateSalesman 11Q2Q Other Dates
2Salesman 1ball101/08/2022Item1/08/202216/08/2022
3Salesman 1skate1216/08/2022ball101614
4Salesman 2bike151/08/2022skate0120
5Salesman 3skate111/08/2022
6Salesman 4skate102/08/2022
7Salesman 1ball1410/08/2022
8Salesman 1ball1616/08/2022
9Salesman 2bike121/08/2022
10Salesman 3skate1416/08/2022
11Salesman 4skate1616/08/2022
Q
Cell Formulas
RangeFormula
G3:G4G3=UNIQUE(FILTER(B2:B11,A2:A11=G1))
H3:I4H3=SUMIFS($C$2:$C$11,$A$2:$A$11,$G$1,$B$2:$B$11,$G3,$D$2:$D$11,H$2)
J3:J4J3=SUMIFS(C$2:C$11,A$2:A$11,G$1,B$2:B$11,G3)-SUM(H3:I3)
Dynamic array formulas.
 
Upvote 0
I was missing one column, the client..

I tried to fix the formula but i wasn't able to do it...

when two different clients have the same item, the value goes to the wrong place. I put in orange, the places where the formula doesnt work...

Could you please help me?
 

Attachments

  • Captura de ecrã 2022-08-23, às 14.19.25.png
    Captura de ecrã 2022-08-23, às 14.19.25.png
    171.2 KB · Views: 4
Upvote 0
Hi,

try this as a result of my work as well as @Peter_SSs

EF - dependent drop down.xlsx
ABCDEFGHIJKLMNOPQ
1NameclientItemSaleDateSalesman 11Q2Q Other DatesSalesman 11Q2Q Other Dates
2Salesman 1Helenball101-8-2022ClientItem1-8-202216-8-2022ClientItem1-8-202216-8-2022
3Salesman 1Helenball1016-8-2022Helenball10100Helenball10100
4Salesman 2Helenball1017-8-2022Johnball15150Johnball15150
5Salesman 1Johnball151-8-2022Tombike0020Tombike0020
6Salesman 1Johnball1516-8-2022Willball1000Willball1000
7Salesman 1Tombike2023-8-2022
8Salesman 1Willball101-8-2022
9Salesman 2Maryskate151-8-2022
10Salesman 3Katebike202-8-2022
Sheet1
Cell Formulas
RangeFormula
G3:H6,M3:N6G3=UNIQUE(FILTER($B$2:$C$10,$A$2:$A$10=G$1))
I3:J6I3=SUMIFS($D$2:$D$10,$A$2:$A$10,$G$1,$C$2:$C$10,$H3,$E$2:$E$10,I$2,$B$2:$B$10,$G3)
K3:K6K3=SUMIFS(D$2:D$10,A$2:A$10,G$1,C$2:C$10,H3,$B$2:$B$10,$G3)-SUM(I3:J3)
O3:P6O3=SUM(FILTER($D$2:$D$10,$A$2:$A$10&$B$2:$B$10&$C$2:$C$10&$E$2:$E$10=$M$1&$M3&$N3&O$2,0))
Q3:Q6Q3=SUM(FILTER($D$2:$D$10,$A$2:$A$10&$B$2:$B$10&$C$2:$C$10=$M$1&$M3&$N3,0))-SUM(O3:P3)
Dynamic array formulas.


As a tip: try to breakdown our proposed solution and try to understand how we came to this solution and if not, ask us to explain. This way you'll gain knowledge on we've used Excel.
 
Upvote 0
Ok, i will look at the formula to try to understand it and if i have any doubts i´ll come back to ask for info..Thanks!
 
Upvote 0
In the cell K3 it returns the value 0 because ti gives you the sum of 20 and subtracts the same value. is there a way the it recognizes the date diferent than Q1 and Q2 and return the exact value?
 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,546
Members
449,038
Latest member
Guest1337

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