Creating a ifs function - spill error

vlmedia

New Member
Joined
Feb 27, 2020
Messages
8
I would like to create a formula for each customer (column A; i.e. customer 1 made 8 purchases, customer 2 made 20 purchases, etc...) to calculate a ratio in column W based on column V. For example, cell W5 should return 0.75 (3 divided by 4; 3 comes from cell V5 and 4 comes from 4 observations including V5), cell W6 should return 0.80 (4 divided by 5), etc...

I tried this formula "=IF($A2=1,V2/COUNT(V2))" but won't work if I drag it down since I have 100 different customers.
I attempted a different formula "=IF(A$2:A2=A2,V2/(COUNT(V$2:V2)))" but I get a spill error.

Thank you in advance for your help.
 

Attachments

  • Capture02.JPG
    Capture02.JPG
    148.5 KB · Views: 48

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try in W2:

=V2/COUNTIF($A$2:$A2,A2)

I haven't actually tested this since I didn't want to type in all your data, but it should work.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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