Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

Excel 2013 Sum calls based on first two digits.

Posted on 2014-10-02
Medium Priority
141 Views
Hi,

I am currently trying to find the cost for telephone calls made from number 123-456789 to numbers starting with 7 and then sum the costs for all those calls. See example below.

The only thing is that it must not contain numbers that start with 77

I will then do similar matches with other numbers, say starting with the number 6.

Is this possible without very complicated macros?

From               To                  Cost
123-456789      71574588      0,2 - Included
123-456789      72574588      0,2 - Included
123-456789      73574588      0,2 - Included
123-456789      74574588      0,2 - Included
123-456789      75574588      0,2 - Included
123-456789      76574588      0,2 - Included
123-456789      77574588      0,2 - Not Included

SUM = 1,2.
0
Question by:MarcusSjogren
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 5
• 4

LVL 27

Expert Comment

ID: 40357472
see the attached example.
Book1.xlsb
0

LVL 4

Author Comment

ID: 40364304
Sorry for my late reply but I haven't been able to test it yet. But it looks promising and I will revert tomorrow!
0

LVL 4

Author Comment

ID: 40364773
HI again,

Sorry but it does not fully comply with what I was looking for. I wanted it to match on both source and destination number.
Now it is only looking for all "to-numbers" that doesn't start with 77.

Any ideas how to include the source-number matching as well? Added a new row to the bottom of the example table below.

From               To                  Cost
123-456789      71574588      0,2 - Included
123-456789      72574588      0,2 - Included
123-456789      73574588      0,2 - Included
123-456789      74574588      0,2 - Included
123-456789      75574588      0,2 - Included
123-456789      76574588      0,2 - Included
123-456789      77574588      0,2 - Not Included
223-456789      71574588      0,2 - Not Included
0

LVL 27

Expert Comment

ID: 40364787
Book1.xlsb
0

LVL 27

Accepted Solution

ProfessorJimJam earned 2000 total points
ID: 40364793
please bear in mind that my earlier formula was a correct solution to what you have asked initially.  what you have added  in your latest comment, is an additional condition which wasn't part of your initial question.

anyways, i have included now this new condition into the attachment just uploaded few seconds earlier.
0

LVL 4

Author Comment

ID: 40364798
Hi,

Yes - I realize that I was too unclear with my request in my first comment, sorry about that.

Second one is working like a charm. Thanks a lot for your swift help!
0

LVL 27

Expert Comment

ID: 40364799
cell c11  shows the solution.

0

LVL 27

Expert Comment

ID: 40364800
you are welcome.

0

LVL 4

Author Closing Comment

ID: 40364801
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with â€¦
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calculâ€¦
Suggested Courses
Course of the Month8 days, 18 hours left to enroll