Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I search thr'o column and put unique values in differnt sheet and sum corresponding values in


How do I search thr'o column and put unique values in differnt sheet and
sum corresponding values in different column?

For example I have 3 columns in one sheet
from To total
ABC WP 10
ABC ABC 10

My output should looks like this

col from To
ABC 20 20
WP 0 10

thanks in advaced


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I search thr'o column and put unique values in differnt sheet and sum corresponding values in

Should the output be:

col from To
ABC 20 10
WP 0 10


--
Regards,
Tom Ogilvy

test test wrote in message
...

How do I search thr'o column and put unique values in differnt sheet and
sum corresponding values in different column?

For example I have 3 columns in one sheet
from To total
ABC WP 10
ABC ABC 10

My output should looks like this

col from To
ABC 20 20
WP 0 10

thanks in advaced


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I search thr'o column and put unique values in differnt sheet and sum corresponding values in

Assume the original data is in Sheet1 in A1 to C3 with A1 holding the entry
col

On sheet2 enter

ABC
WP
with ABC in A2, WP in A3

in B2 put in the formula

=Sumif(Sheet1!$A:$A,$A2,Sheet1!B:B)
select this cell and drag fill to the right (to C2)

select B2:C2 and drag fill down the column

--
Regards,
Tom Ogilvy


"test" wrote in message
...
Sorry! you are right
Do you know how do I achieve this output thro' code or
formula?
Values in collumn from and To are dynemic.

thanks in advanced
-----Original Message-----
Should the output be:

col from To
ABC 20 10
WP 0 10


--
Regards,
Tom Ogilvy

test test wrote in message
...

How do I search thr'o column and put unique values in

differnt sheet and
sum corresponding values in different column?

For example I have 3 columns in one sheet
from To total
ABC WP 10
ABC ABC 10

My output should looks like this

col from To
ABC 20 20
WP 0 10

thanks in advaced


*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!



.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I search thr'o column and put unique values in differnt sheet and sum corresponding values in

You can select the values in column A, then do Data=Filter=Advanced
filter, click the Unique Only checkbox in the lower left, select copy to
another location, specify D1 as the location (leave criteria blank) and
you get the unique list from A
Repeat for B, but put below the data now in Column D. Now select column D
and repeat, putting the data in E1.

Now you have your unique list and you can use the countif formula.

Turn on the macro recorder while you do this manually (after E is created,
select column D and delete it). Then turn off the macro recorder. Now
modify the code to make it more general if you desire.

Now you can use the code to get your unique list.

--
Regards,
Tom Ogilvy

"test" wrote in message
...

I am taking following approch to solve this problem

1)find distinct values from colA and put in colD
2)find distinct values from colB and put in colE
3)compare colE with coldD if there is any values which is
not in colD then put that values in colD
4)delete the colE
5)sort colD
that's way I will get the distinct list of costcenter in
colD
After I got my list then calculate total
If you have better way, please let me know

thanks

-----Original Message-----
thanks for reply. Sorry! I was not more specific about
requirements.
values(ABC,WP) in COL are dynemically so I can not hard
coded those values in sheet2 because I am getting those
values from database.


-----Original Message-----
Assume the original data is in Sheet1 in A1 to C3 with

A1
holding the entry
col

On sheet2 enter

ABC
WP
with ABC in A2, WP in A3

in B2 put in the formula

=Sumif(Sheet1!$A:$A,$A2,Sheet1!B:B)
select this cell and drag fill to the right (to C2)

select B2:C2 and drag fill down the column

--
Regards,
Tom Ogilvy


"test" wrote in message
...
Sorry! you are right
Do you know how do I achieve this output thro' code or
formula?
Values in collumn from and To are dynemic.

thanks in advanced
-----Original Message-----
Should the output be:

col from To
ABC 20 10
WP 0 10


--
Regards,
Tom Ogilvy

test test wrote in message
...

How do I search thr'o column and put unique values

in
differnt sheet and
sum corresponding values in different column?

For example I have 3 columns in one sheet
from To total
ABC WP 10
ABC ABC 10

My output should looks like this

col from To
ABC 20 20
WP 0 10

thanks in advaced


*** Sent via Developersdex

http://www.developersdex.com
***
Don't just participate in USENET...get rewarded for

it!


.



.

.



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
Count Unique Values in 1 Column based on Date Range in another Column Brian Excel Worksheet Functions 14 May 17th 09 02:58 PM
How to sum unique values in a column moondaddy Excel Worksheet Functions 3 May 31st 07 04:58 AM
Printing 1 Form with differnt values ? cassy01 Excel Discussion (Misc queries) 1 October 6th 05 05:39 PM
create list of unique values from a column with repeated values? Chad Schaben Excel Worksheet Functions 1 July 8th 05 10:25 PM
Finding Unique Values in Column Kirk P. Excel Discussion (Misc queries) 1 January 25th 05 02:01 PM


All times are GMT +1. The time now is 05:43 PM.

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

About Us

"It's about Microsoft Excel"