Formula Bottleneck- identifying the % of promotional transaction that each user has

dionlkk6

New Member
Joined
Dec 8, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi!

I've got a data sheet containing some 20,000 rows, regarding a series of consumer transactions. The cell reference of interest is B (which shows a particular user_id, ranging from A, B,C, DD,EE etc..), and S ( which indicates for a particular transaction, if a consumer has used a promotion- with 1 denoting "yes", and "0" denoting no).

Is there anyway I can find the approximate percentage of promotional transaction that each consumer ? I.e for user A, only 1 (cell S2), out of 9 transactions (cells S2-S9) used a promotions i.e about 89% of transaction did not?

Is there a formula that I can write to test this for all 20,000 cells , which contains approximately 5,000 different users?

6nd8usmeb9481.png
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi dionlkk6,

The tricky part for an Excel 2016 user will be getting that unique list of user_ids for the calculation. The formula in W2 and down will work but when I ran it for 5,000 user_ids I cancelled after 5 minutes as it was only 40% complete. It would be faster to do manually with a copy & paste of B2 down into W2 down and then Data, Remove Duplicates.

The calculation of percentage Used Promotion/Promotion Not Used is fast for even 50,000 rows of Month data.

dionlkk6.xlsx
ABSTUVWXY
1MonthUserIdis_promotion_to_useTotalCostUseridUsed PromotionPromotion Not Used
2NovemberA13.64A42.86%57.14%
3NovemberA010.93B0.00%100.00%
4NovemberA07.54C25.00%75.00%
5NovemberA07.92   
6NovemberA07.29   
7NovemberA11.1   
8NovemberA17.78   
9NovemberB010.66   
10NovemberB01.85   
11NovemberB06.08   
12NovemberC04.35   
13NovemberC05.04   
14NovemberC010.78   
15NovemberC12.59   
dionlkk6
Cell Formulas
RangeFormula
W2:W15W2=INDEX($B$2:$B$999,MATCH(0,INDEX(COUNTIF($W$1:$W1,$B$2:$B$999),),0))&""
X2:X15X2=IF($W2="","",COUNTIFS($B$2:$B$49999,$W2,$S$2:$S$49999,1)/COUNTIFS($B$2:$B$49999,$W2))
Y2:Y15Y2=IF($W2="","",COUNTIFS($B$2:$B$49999,$W2,$S$2:$S$49999,0)/COUNTIFS($B$2:$B$49999,$W2))
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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