Formula to make list shorter

Yaseraliakram

New Member
Joined
Nov 14, 2019
Messages
14
Hi guys,

I was wondering if somebody could help me with the following.
I have three columns, if somebody dials 93xxxxxxxx numbers the rate wil be charged 0.1575, and if someone dials 9320xxxxx the rate will also be charged0.1575.
In this case i want to delete the row with the prefix 9320. how ever the rate of 9325 is different so that i dont want to delete.
The same goes for 937500 should be deleten beceause if that prefix is not in the list the rate of the prefix 937 will be charged.

Can i do this witha formula ? See the excel list below.

Afghanistan930.1575
Afghanistan Kabul93200.1575
Afghanistan Kabul93250.16
Afghanistan Mobile9370.11172
Afghanistan Mobile AT93750.15382
Afghanistan Mobile AT9375000.15382
Afghanistan Mobile AWCC93700.13472
Afghanistan Mobile AWCC93710.13472
Afghanistan Mobile AWCC937110.13472
Afghanistan Mobile Etisalat93780.11172
Afghanistan Mobile MTN93760.11413
Afghanistan Mobile MTN93770.11413
Afghanistan Mobile Roshan93720.10238
Afghanistan Mobile Roshan93790.10238
Afghanistan Mobile Salam93740.13692

<colgroup><col style="mso-width-source:userset;mso-width-alt:9113;width:200pt" width="267"> <col style="mso-width-source:userset;mso-width-alt:3003;width:66pt" width="88"> <col style="mso-width-source:userset;mso-width-alt:2252;width:50pt" width="66"> </colgroup><tbody>
</tbody>
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
A slightly shorter formula for you for future use if you need it.

=SUMPRODUCT(COUNTIFS($B$2:$B$16,INT(B2/({10}^COLUMN($A$1:$L$1))),$C$2:$C$16,C2))

Rows with a zero result need to be kept, those with a result greater than 0 can be removed.
 
Upvote 0
Yes this formula is also working awsome,
Thanx a million again,

how ever i have a new chalange, maybe you can solve that also, as it looks similiar with this one. :)

 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,709
Members
449,093
Latest member
Mnur

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