View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Darcy Darcy is offline
external usenet poster
 
Posts: 14
Default Tough problem adding cells from different sheets, in random or

Thanks Wild, I will try that and let you know, but why do I need to add a
column for origin?

Darcy

"WilD" wrote:

Hi. Try this.
1. Put Sheet1 and Sheet2 together and ad a column displaying sheet origin.
Then ad Title Columns to each column. For example:
ColumnA ColumnB Origin
12 190 Sheet1
34 180 Sheet1
10 90 Sheet1
4 60 Sheet1
11 80 Sheet1
10 220 Sheet2
23 190 Sheet2
34 160 Sheet2
12 90 Sheet2

2. Select this table including Titles (A1 to C10). Then press [Alt+D+P] to
enter PivotTable Wizard.
Then Click [Next]. (Step 1-3)
Then Click [Next] again. (Step 2-3)
Then Click [Finish]. (Step 3-3)
This will create a new Sheet and will show you the "PivotTable Field List"
Window.

3. In "PivotTable Field List"
Right-Click ColumnA and Select "Add to Row Labels".
Then Right-Click ColumnB and Select "Add To Values".
You should now see the report you were looking for.

4. To order ColumnA descending, just Click on any value in column a and
Choose from menu Data, "Sort Largest to Smallest" Button (ZA!).

There are other possibilities to solve this task but I think this is the
easiest one.



"Darcy" wrote:

Sorry looks like my columns got screwed up, Hopefully these are easier to
understand.

Sheet 1 Sheet 2

a b a b
12 190 10 220
34 180 23 190
10 90 34 160
4 60 12 90
11 80
Sheet 3


a b
34 340
10 310
12 280
23 190
11 80
4 60

"Darcy" wrote:

Sheet 1 Sheet 2
Sheet 3

a b a b
a b
12 190 10 220
34 340
34 180 23 190
10 310
10 90 34 160
12 280
4 60 12 90
23 190
11 80
11 80

4 60

What I'm looking for is the result in sheet 3, I need column b to be the sum
of column b in sheets 1 and 2 based on the number in column a being the same,
then sorting based on column b, and obviously if the number in column a does
not occur twice then it is still added in sheet 3 with its original column b
value.
Tough to explain, but if I look at the number 12 in sheet 1 column a, I look
for another number 12 in sheet 2 column a, if there is one there, then I add
the two corresponding values in column b, and put the result in sheet 3, and
sort.

Anyone have some ideas, Please help.

Thanks

Darcy