Sum of different value in different worksheet & cell number

  • Thread starter Values sum in Multuiple Worksheet/cell
  • Start date
V

Values sum in Multuiple Worksheet/cell

I have multiple worksheet with different location of values(cell number in
different row) to sum up, but with one reference. Example;

I need to sum up the number of apples in one workbook:

1. worksheet (1) where it says 25 apples in row 100, column AJ
2. worksheet (2) where it says 100 apples in row 200, column AJ
3. worksheet (3) where it says 200 apples in row 300, column AJ

In one worksheet, there is a table of many fruits Banana, Pineapple,
strawberry, etc. that has also values at different rows. The table is
generated by our computer where it comes randomly as entered by the supplier.
Displacement is due to no entry on days where there is no delivery.

The only reference for apple to distinguish from other fruits is the name
"Apple" which is also positioned in a different row but on the table of
apples in the worksheet.

From the above example, it should give me a total of 325 apples for one
workbook.

Please help... Thanks - VL
 
D

Don Guillett

Maybe
Sub sumcolbinallsheets()
For i = 1 To Sheets.Count
ms = ms + Sheets(i).Cells(Rows.Count, 2).End(xlUp)
Next i
MsgBox ms
End Sub
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
"Values sum in Multuiple Worksheet/cell" <Values sum in Multuiple
Worksheet/[email protected]> wrote in message
news:[email protected]...
 
Z

zvkmpw

I have multiple worksheet with different location of values(cell number in
different row) to sum up, but with one reference. Example;

I need to sum up the number of apples in one workbook:

1. worksheet (1) where it says 25 apples in row 100, column AJ
2. worksheet (2) where it says 100 apples in row 200, column AJ
3. worksheet (3) where it says 200 apples in row 300, column AJ

In one worksheet, there is a table of many fruits Banana, Pineapple,
strawberry, etc. that has also values at different rows. The table is
generated by our computer where it comes randomly as entered by the supplier.
Displacement is due to no entry on days where there is no delivery.

The only reference for apple to distinguish from other fruits is the name
"Apple" which is also positioned in a different row but on the table of
apples in the worksheet.

From the above example, it should give me a total of 325 apples for one
workbook.

Please help... Thanks - VL

Not quite sure about the requirements, but it sounds like a job for
SUMIF.

Presumably, there's a column indicating the fruit for each row.
Suppose it's column A.

Then something like this might be useful:
=SUMIF(Sheet1!A:A,"Apple",Sheet1!AJ:AJ)+
SUMIF(Sheet2!A:A,"Apple",Sheet2!AJ:AJ)+
SUMIF(Sheet3!A:A,"Apple",Sheet3!AJ:AJ)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top