Populate verbatim with criteria

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi,

I have the following data:

Book1
ABCDEFGHI
1BranchAverage Ticket4/2/20244/3/20244/4/20244/5/20244/6/20244/7/20244/8/2024
2Branch1150150204204204204204204
3Branch2150150204204204204204204
4Branch3150150204204204204204204
5Branch4150150204204201204204201
6Branch5180180300204204204204204
7Branch6150150204204204300204204
8Branch7125125204204204204204204
9Branch8150150204204204108108204
10Branch9150150204204204204204204
11Branch10147147204204204201201204
12Branch11150150204201204204204204
13Branch12235235204204204204300300
14Branch13150150204204204204204204
15Branch14150150204108204201204204
16Branch15125300204204204300204204
17Branch16150150204204204204108204
18Branch17150150204204204204201204
19Branch18150150300204204204204204
20Branch19125300204204204204204204
21Branch20150150204204204204204204
22Branch21150150204204204204204204
23
24Date%
254/4/202410%
Data (2)



Book1
ABCDEFG
27Correct Result
28Branch 15 exceeded the daily ticket volume by 140% compared to historical average
29Branch 19 exceeded the daily ticket volume by 140% compared to historical average
Data (2)



Column A is the list of branches. Column B has the historical average daily volume for each branch.Column C to column I has the actual daily tickets. I am trying to build a formula to check the date in cell A25 and then check the actual daily ticket for that date, and if exceeds the historical average in column B by more than a certain percentage, in this case 10% in cell B25, to return a remark that the particular branch exceeded by certain % .

Example of the correct result is in cell A28 and A29. Is this possible with a formula ? Appreciate all the help.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
How about
Excel Formula:
=LET(p,(XLOOKUP(A25,C1:I1,C2:I22)-B2:B22)/B2:B22,f,FILTER(HSTACK(A2:A22,p),p>B25),INDEX(f,,1)&" exceeded the daily ticket volume by " & TEXT(INDEX(f,,2),"0%")&" compared to historical average")
 
Upvote 0
Hi Fluff,

Thank you so much and that worked 🙏. Is there a way to add the following criteria ?

To also return the same if the volume drops by more than the percentage in cell b25 ( i.e "Branch 15 daily volume dropped by % compared to historical average") and return blank if not match for both criteria.
 
Upvote 0
How about
Excel Formula:
=LET(p,(XLOOKUP(A25,C1:I1,C2:I22)-B2:B22)/B2:B22,f,FILTER(HSTACK(A2:A22,p),p<0),IF(COUNT(f)=0,"",INDEX(f,,1)&" exceeded the daily ticket volume by " & TEXT(INDEX(f,,2),"0%")&" compared to historical average"))
Change the wording to suit.
 
Upvote 0
Hi Fluff,

Thanks Fluff and really appreciate it. Is there a way to use both formula in the same cell i.e combining both formula so that the result will be populated accordingly if the volume was exceeded or reduced ?
 
Upvote 0
Try
Excel Formula:
=LET(p,(XLOOKUP(A25,C1:I1,C2:I22)-B2:B22)/B2:B22,fh,FILTER(HSTACK(A2:A22,p),p>B25),fl,FILTER(HSTACK(A2:A22,p),p<0),VSTACK(IF(COUNT(fh)=0,"",INDEX(fh,,1)&" exceeded the daily ticket volume by " & TEXT(INDEX(fh,,2),"0%")&" compared to historical average"),IF(COUNT(fl)=0,"",INDEX(fl,,1)&" exceeded the daily ticket volume by " & TEXT(INDEX(fl,,2),"0%")&" compared to historical average")))
 
Upvote 0
Solution
Thank you Fluff and really appreciate it. That worked, Have a wonderful day ahead .🙏
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,256
Messages
6,123,903
Members
449,132
Latest member
Rosie14

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