If a row contains more then 3 numbers

Lancer7

New Member
Joined
Oct 16, 2022
Messages
49
Office Version
  1. 365
Platform
  1. Windows
Wondering If there is a simple way to do a formula based on how many numbers are in a column. For example in Cell B:50 I have a number 5500, If A:1 to A:20 has 3 different numbers anywhere within that range I want it to subtract 5% from 5500 giving me 5225, If A:1 To A:20 Has 4 different numbers I want it to subtract 6%, If A1:A20 has 5 different numbers I want it to subtract 7%. on repeat all the way from 3 different numbers up to 7. What Im trying to build is a rebate calculator and the more "Categories" a customer buys from the higher rebate they get the range A1:A20 is the category numbers so there a customer could buy from say category 2,6, and 7. That would be 3 categories for the 5% rebate
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try:

Excel Formula:
=LET(c,COUNT(A1:A20),p,IF(c<3,0,MIN(c,7)+2)/100,B50*(1-p))
 
Upvote 1
Solution

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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