Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sam Sam is offline
external usenet poster
 
Posts: 699
Default formula to add values for all the same first words in cells in a r

I have the range of data like the following:

Description

Column A Column B
UAE Mobile 21
UAE 22
Bangladish-Sylhet (2) 33
Bangladish Mob 26
Bangladish Mob (1) 15
Bangladish Mob (2) 29
Bangladish Mob (3) 98

I want the totals of values in column B for the similar values in column A
to be added up. Now I need different stages of totals:

1- I need totals for all the values in column A where the first word is the
same. For example Bangladesh. But Bangladesh is separated from the
remaining text in some cases by a "space" and in some cases by "-".

2- Second I need subtotal for all the values in column A where the first two
words are the same. For example Bangladesh Mobile or Bangladesh-Sylhet. In
these cases the words are separated in the first instance by a "space" and in
the second one by the "-".

3- I want further subtotal where the first three words of the value in
column A are the same and so on and so on.........

Ny help URGENTLY!

Thanks

SAM
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default formula to add values for all the same first words in cells in a r

Assuming your data in A1:B100
Criterias in:
C1: holds Bangladish
C2: holds Bangladish Mob
and so on....

=SUMPRODUCT(--(LEFT($A$1:$A$100,LEN(C1))=C1),$B$1:$B$100)
copy down

"SAM" wrote:

I have the range of data like the following:

Description

Column A Column B
UAE Mobile 21
UAE 22
Bangladish-Sylhet (2) 33
Bangladish Mob 26
Bangladish Mob (1) 15
Bangladish Mob (2) 29
Bangladish Mob (3) 98

I want the totals of values in column B for the similar values in column A
to be added up. Now I need different stages of totals:

1- I need totals for all the values in column A where the first word is the
same. For example Bangladesh. But Bangladesh is separated from the
remaining text in some cases by a "space" and in some cases by "-".

2- Second I need subtotal for all the values in column A where the first two
words are the same. For example Bangladesh Mobile or Bangladesh-Sylhet. In
these cases the words are separated in the first instance by a "space" and in
the second one by the "-".

3- I want further subtotal where the first three words of the value in
column A are the same and so on and so on.........

Ny help URGENTLY!

Thanks

SAM

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sam Sam is offline
external usenet poster
 
Posts: 699
Default formula to add values for all the same first words in cells in

Well thanks. It does seem to work but was just wondering if I can have a few
more filtering done to this formula for it to be more effective because the
amount of data that I have is just immense.

What I understand is that I have to put the characters in C1, C2, C3.......
and the formula will match these chracters with the range mentioned and put a
total infront of it.

I can probably have a predetermined sort of list ready in a separate sheet
and can apply that formula infornt of the list of those countries. But the
problem is that I need to do this exercise on a weekly basis and every week
there might be scenarios like the following whereby the data may differ from
week to week:

1- Different countires names might appear in one week when those names were
not in the list in the previous week.

2- Countires names are repeated more than once. An extract is given below:

Bangladish (1)
Bangladish (1)
Bangladish (2)
Bangladish (2)
Bangladish (3)
Bangladish (3)
Bangladish-Chttagong (1)
Bangladish-Chttagong (1)
Bangladish-Chttagong (2)
Bangladish-Chttagong (2)
Bangladish-Chttagong (3)

So can I have the formulas which can do the following for me:

1- Formula which can compare the range of the countries in the current week
with the previous week and list down the new countries list

2- A formula which can refine the list and remove duplicated names.

Using the results of the above formulas, I can come up with a refined list
every week, whereby I can add the new countries (if any) week after week.
Infront of this refined list I can then apply your original formula and get
the magical results :)

Thanks







"Teethless mama" wrote:

Assuming your data in A1:B100
Criterias in:
C1: holds Bangladish
C2: holds Bangladish Mob
and so on....

=SUMPRODUCT(--(LEFT($A$1:$A$100,LEN(C1))=C1),$B$1:$B$100)
copy down

"SAM" wrote:

I have the range of data like the following:

Description

Column A Column B
UAE Mobile 21
UAE 22
Bangladish-Sylhet (2) 33
Bangladish Mob 26
Bangladish Mob (1) 15
Bangladish Mob (2) 29
Bangladish Mob (3) 98

I want the totals of values in column B for the similar values in column A
to be added up. Now I need different stages of totals:

1- I need totals for all the values in column A where the first word is the
same. For example Bangladesh. But Bangladesh is separated from the
remaining text in some cases by a "space" and in some cases by "-".

2- Second I need subtotal for all the values in column A where the first two
words are the same. For example Bangladesh Mobile or Bangladesh-Sylhet. In
these cases the words are separated in the first instance by a "space" and in
the second one by the "-".

3- I want further subtotal where the first three words of the value in
column A are the same and so on and so on.........

Ny help URGENTLY!

Thanks

SAM

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default formula to add values for all the same first words in cells in

I believe the easiest solution is for you to use "Auto Filter"!

Check it out in the Help files, and post back with any questions.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"SAM" wrote in message
...
Well thanks. It does seem to work but was just wondering if I can have a

few
more filtering done to this formula for it to be more effective because

the
amount of data that I have is just immense.

What I understand is that I have to put the characters in C1, C2,

C3.......
and the formula will match these chracters with the range mentioned and

put a
total infront of it.

I can probably have a predetermined sort of list ready in a separate sheet
and can apply that formula infornt of the list of those countries. But

the
problem is that I need to do this exercise on a weekly basis and every

week
there might be scenarios like the following whereby the data may differ

from
week to week:

1- Different countires names might appear in one week when those names

were
not in the list in the previous week.

2- Countires names are repeated more than once. An extract is given

below:

Bangladish (1)
Bangladish (1)
Bangladish (2)
Bangladish (2)
Bangladish (3)
Bangladish (3)
Bangladish-Chttagong (1)
Bangladish-Chttagong (1)
Bangladish-Chttagong (2)
Bangladish-Chttagong (2)
Bangladish-Chttagong (3)

So can I have the formulas which can do the following for me:

1- Formula which can compare the range of the countries in the current

week
with the previous week and list down the new countries list

2- A formula which can refine the list and remove duplicated names.

Using the results of the above formulas, I can come up with a refined list
every week, whereby I can add the new countries (if any) week after week.
Infront of this refined list I can then apply your original formula and

get
the magical results :)

Thanks







"Teethless mama" wrote:

Assuming your data in A1:B100
Criterias in:
C1: holds Bangladish
C2: holds Bangladish Mob
and so on....

=SUMPRODUCT(--(LEFT($A$1:$A$100,LEN(C1))=C1),$B$1:$B$100)
copy down

"SAM" wrote:

I have the range of data like the following:

Description

Column A Column B
UAE Mobile 21
UAE 22
Bangladish-Sylhet (2) 33
Bangladish Mob 26
Bangladish Mob (1) 15
Bangladish Mob (2) 29
Bangladish Mob (3) 98

I want the totals of values in column B for the similar values in

column A
to be added up. Now I need different stages of totals:

1- I need totals for all the values in column A where the first word

is the
same. For example Bangladesh. But Bangladesh is separated from the
remaining text in some cases by a "space" and in some cases by "-".

2- Second I need subtotal for all the values in column A where the

first two
words are the same. For example Bangladesh Mobile or

Bangladesh-Sylhet. In
these cases the words are separated in the first instance by a "space"

and in
the second one by the "-".

3- I want further subtotal where the first three words of the value in
column A are the same and so on and so on.........

Ny help URGENTLY!

Thanks

SAM


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sam Sam is offline
external usenet poster
 
Posts: 699
Default formula to add values for all the same first words in cells in

Well I have tried using the auto filter but it requires lot of manual
intervention to find the totals for all the countries, while the using the
forlula provided by "teethless mama" gives me the totals just by copying the
formula infront of the names list.

Do you think macro can help in this thing?

"Ragdyer" wrote:

I believe the easiest solution is for you to use "Auto Filter"!

Check it out in the Help files, and post back with any questions.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"SAM" wrote in message
...
Well thanks. It does seem to work but was just wondering if I can have a

few
more filtering done to this formula for it to be more effective because

the
amount of data that I have is just immense.

What I understand is that I have to put the characters in C1, C2,

C3.......
and the formula will match these chracters with the range mentioned and

put a
total infront of it.

I can probably have a predetermined sort of list ready in a separate sheet
and can apply that formula infornt of the list of those countries. But

the
problem is that I need to do this exercise on a weekly basis and every

week
there might be scenarios like the following whereby the data may differ

from
week to week:

1- Different countires names might appear in one week when those names

were
not in the list in the previous week.

2- Countires names are repeated more than once. An extract is given

below:

Bangladish (1)
Bangladish (1)
Bangladish (2)
Bangladish (2)
Bangladish (3)
Bangladish (3)
Bangladish-Chttagong (1)
Bangladish-Chttagong (1)
Bangladish-Chttagong (2)
Bangladish-Chttagong (2)
Bangladish-Chttagong (3)

So can I have the formulas which can do the following for me:

1- Formula which can compare the range of the countries in the current

week
with the previous week and list down the new countries list

2- A formula which can refine the list and remove duplicated names.

Using the results of the above formulas, I can come up with a refined list
every week, whereby I can add the new countries (if any) week after week.
Infront of this refined list I can then apply your original formula and

get
the magical results :)

Thanks







"Teethless mama" wrote:

Assuming your data in A1:B100
Criterias in:
C1: holds Bangladish
C2: holds Bangladish Mob
and so on....

=SUMPRODUCT(--(LEFT($A$1:$A$100,LEN(C1))=C1),$B$1:$B$100)
copy down

"SAM" wrote:

I have the range of data like the following:

Description

Column A Column B
UAE Mobile 21
UAE 22
Bangladish-Sylhet (2) 33
Bangladish Mob 26
Bangladish Mob (1) 15
Bangladish Mob (2) 29
Bangladish Mob (3) 98

I want the totals of values in column B for the similar values in

column A
to be added up. Now I need different stages of totals:

1- I need totals for all the values in column A where the first word

is the
same. For example Bangladesh. But Bangladesh is separated from the
remaining text in some cases by a "space" and in some cases by "-".

2- Second I need subtotal for all the values in column A where the

first two
words are the same. For example Bangladesh Mobile or

Bangladesh-Sylhet. In
these cases the words are separated in the first instance by a "space"

and in
the second one by the "-".

3- I want further subtotal where the first three words of the value in
column A are the same and so on and so on.........

Ny help URGENTLY!

Thanks

SAM





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default formula to add values for all the same first words in cells in

There are a lot of things you are looking for and I am only visiting
the NG presently for a short time, so I might not be around for the
followup...

One thing that can help you is to identify the delimiter points. I.e.
when the first word ends, when the second one ends etc.

The following *array* formula will find the position of the first non-
letter (i.e. delimiter, be it space, dash or whatever). In B1:

=MIN(IF(ISERROR(SEARCH(MID(A1,ROW($1:$100),
1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ")),ROW($1:$100)))

In C1 (and copied to D1):

=MIN(IF(ISERROR(SEARCH(MID($A1,ROW($1:$100),
1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"),B1+1),ROW($1:$100 )))

Now you have these delimiters (although for items like Bangladesh (1)
we might need a different strategy). You can use them in the following
manner:

=LEFT(A1,B1-1)

I know it is not a complete solution but it might be a start.

HTH
Kostis Vezerides

On Jun 17, 4:52 pm, SAM wrote:
Well thanks. It does seem to work but was just wondering if I can have a few
more filtering done to this formula for it to be more effective because the
amount of data that I have is just immense.

What I understand is that I have to put the characters in C1, C2, C3.......
and the formula will match these chracters with the range mentioned and put a
total infront of it.

I can probably have a predetermined sort of list ready in a separate sheet
and can apply that formula infornt of the list of those countries. But the
problem is that I need to do this exercise on a weekly basis and every week
there might be scenarios like the following whereby the data may differ from
week to week:

1- Different countires names might appear in one week when those names were
not in the list in the previous week.

2- Countires names are repeated more than once. An extract is given below:

Bangladish (1)
Bangladish (1)
Bangladish (2)
Bangladish (2)
Bangladish (3)
Bangladish (3)
Bangladish-Chttagong (1)
Bangladish-Chttagong (1)
Bangladish-Chttagong (2)
Bangladish-Chttagong (2)
Bangladish-Chttagong (3)

So can I have the formulas which can do the following for me:

1- Formula which can compare the range of the countries in the current week
with the previous week and list down the new countries list

2- A formula which can refine the list and remove duplicated names.

Using the results of the above formulas, I can come up with a refined list
every week, whereby I can add the new countries (if any) week after week.
Infront of this refined list I can then apply your original formula and get
the magical results :)

Thanks

"Teethless mama" wrote:
Assuming your data in A1:B100
Criterias in:
C1: holds Bangladish
C2: holds Bangladish Mob
and so on....


=SUMPRODUCT(--(LEFT($A$1:$A$100,LEN(C1))=C1),$B$1:$B$100)
copy down


"SAM" wrote:


I have the range of data like the following:


Description


Column A Column B
UAE Mobile 21
UAE 22
Bangladish-Sylhet (2) 33
Bangladish Mob 26
Bangladish Mob (1) 15
Bangladish Mob (2) 29
Bangladish Mob (3) 98


I want the totals of values in column B for the similar values in column A
to be added up. Now I need different stages of totals:


1- I need totals for all the values in column A where the first word is the
same. For example Bangladesh. But Bangladesh is separated from the
remaining text in some cases by a "space" and in some cases by "-".


2- Second I need subtotal for all the values in column A where the first two
words are the same. For example Bangladesh Mobile or Bangladesh-Sylhet. In
these cases the words are separated in the first instance by a "space" and in
the second one by the "-".


3- I want further subtotal where the first three words of the value in
column A are the same and so on and so on.........


Ny help URGENTLY!


Thanks


SAM



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert values in figures to words in EXCEL 2000? John Excel Worksheet Functions 2 July 8th 06 12:28 PM
Assigning values to words cardingtr Excel Discussion (Misc queries) 4 February 18th 06 04:30 AM
Why do my cell values/words duplicate themselves over and over? stevow84 Excel Discussion (Misc queries) 1 January 31st 06 09:44 PM
How do I sum cells that have values from a countif formula? Cheri Excel Worksheet Functions 5 August 3rd 05 09:53 PM
How To Use Cells Without Values in a Formula Roger H. Excel Worksheet Functions 2 April 6th 05 01:01 AM


All times are GMT +1. The time now is 12:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"