If a row contains more then 3 numbers

Lancer7

Board Regular
Joined
Oct 16, 2022
Messages
54
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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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,223,885
Messages
6,175,186
Members
452,615
Latest member
bogeys2birdies

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