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.

Afghanistan Kabul
Afghanistan Kabul
Afghanistan Mobile
Afghanistan Mobile AT
Afghanistan Mobile AT
Afghanistan Mobile AWCC
Afghanistan Mobile AWCC
Afghanistan Mobile AWCC
Afghanistan Mobile Etisalat
Afghanistan Mobile MTN
Afghanistan Mobile MTN
Afghanistan Mobile Roshan
Afghanistan Mobile Roshan
Afghanistan Mobile Salam

<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>
[TD="width: 267"]Afghanistan[/TD]
[TD="width: 88, align: right"]93[/TD]
[TD="width: 66, align: right"]0.1575[/TD]

[TD="align: right"]9320[/TD]
[TD="align: right"]0.1575[/TD]

[TD="align: right"]9325[/TD]
[TD="align: right"]0.16[/TD]

[TD="align: right"]937[/TD]
[TD="align: right"]0.11172[/TD]

[TD="align: right"]9375[/TD]
[TD="align: right"]0.15382[/TD]

[TD="align: right"]937500[/TD]
[TD="align: right"]0.15382[/TD]

[TD="align: right"]9370[/TD]
[TD="align: right"]0.13472[/TD]

[TD="align: right"]9371[/TD]
[TD="align: right"]0.13472[/TD]

[TD="align: right"]93711[/TD]
[TD="align: right"]0.13472[/TD]

[TD="align: right"]9378[/TD]
[TD="align: right"]0.11172[/TD]

[TD="align: right"]9376[/TD]
[TD="align: right"]0.11413[/TD]

[TD="align: right"]9377[/TD]
[TD="align: right"]0.11413[/TD]

[TD="align: right"]9372[/TD]
[TD="align: right"]0.10238[/TD]

[TD="align: right"]9379[/TD]
[TD="align: right"]0.10238[/TD]

[TD="align: right"]9374[/TD]
[TD="align: right"]0.13692[/TD]

</tbody>
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
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,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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