Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Unable to add numbers from another sheet
I have a sheet that imports data from a database. In another sheet I want to
add the numbers in a column B if the string in column Is "ABC". I have tried different functions such as "=SUMPRODUCT(--(Sheet1!B7:B238="ABC")*Sheet2!D7:D238)" AND "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" Nothing seems to work. Any suggestion will be a great help. I am on deadline here. Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Unable to add numbers from another sheet
Why are you using sumproduct? SumIF should work
"=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" "UT" wrote: I have a sheet that imports data from a database. In another sheet I want to add the numbers in a column B if the string in column Is "ABC". I have tried different functions such as "=SUMPRODUCT(--(Sheet1!B7:B238="ABC")*Sheet2!D7:D238)" AND "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" Nothing seems to work. Any suggestion will be a great help. I am on deadline here. Thanks. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Unable to add numbers from another sheet
Look for unseen characters like leading/trailing spaces in the ranges. The
numbers in column D may be TEXT. I see you're referencing 2 different sheets. See if this works: =SUMPRODUCT(--(TRIM(Sheet1!B7:B238)="abc"),Sheet2!D7:D238+0) -- Biff Microsoft Excel MVP "UT" wrote in message ... I have a sheet that imports data from a database. In another sheet I want to add the numbers in a column B if the string in column Is "ABC". I have tried different functions such as "=SUMPRODUCT(--(Sheet1!B7:B238="ABC")*Sheet2!D7:D238)" AND "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" Nothing seems to work. Any suggestion will be a great help. I am on deadline here. Thanks. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Unable to add numbers from another sheet
"SUMIF" seems to be obvious choice but it shows a value of 0. Does it matter
that I am trying to add numbers imported from a database? Thanks!! "Joel" wrote: Why are you using sumproduct? SumIF should work "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" "UT" wrote: I have a sheet that imports data from a database. In another sheet I want to add the numbers in a column B if the string in column Is "ABC". I have tried different functions such as "=SUMPRODUCT(--(Sheet1!B7:B238="ABC")*Sheet2!D7:D238)" AND "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" Nothing seems to work. Any suggestion will be a great help. I am on deadline here. Thanks. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Unable to add numbers from another sheet
Maybe your data that looks like numbers aren't really numbers.
If you put =count(d7:d238) what do you see? This should count all the entries that are numeric. If you see 0 with this formula, then maybe your data has extra stuff in the cell. Depending on what it is, there are different ways of cleaning this up. David McRitchie has a macro: http://www.mvps.org/dmcritchie/excel/join.htm#trimall (look for "Sub Trimall()") And if you're new to macros, you may want to read David's intro: http://www.mvps.org/dmcritchie/excel/getstarted.htm === If that doesn't clean up all the data, you can use Chip Pearson's CellView Addin to find out what's really in the cells: http://www.cpearson.com/excel/CellView.aspx UT wrote: "SUMIF" seems to be obvious choice but it shows a value of 0. Does it matter that I am trying to add numbers imported from a database? Thanks!! "Joel" wrote: Why are you using sumproduct? SumIF should work "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" "UT" wrote: I have a sheet that imports data from a database. In another sheet I want to add the numbers in a column B if the string in column Is "ABC". I have tried different functions such as "=SUMPRODUCT(--(Sheet1!B7:B238="ABC")*Sheet2!D7:D238)" AND "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" Nothing seems to work. Any suggestion will be a great help. I am on deadline here. Thanks. -- Dave Peterson |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Unable to add numbers from another sheet
You are right. The numbers are inserted as strings. Many thanks for the tip.
"Dave Peterson" wrote: Maybe your data that looks like numbers aren't really numbers. If you put =count(d7:d238) what do you see? This should count all the entries that are numeric. If you see 0 with this formula, then maybe your data has extra stuff in the cell. Depending on what it is, there are different ways of cleaning this up. David McRitchie has a macro: http://www.mvps.org/dmcritchie/excel/join.htm#trimall (look for "Sub Trimall()") And if you're new to macros, you may want to read David's intro: http://www.mvps.org/dmcritchie/excel/getstarted.htm === If that doesn't clean up all the data, you can use Chip Pearson's CellView Addin to find out what's really in the cells: http://www.cpearson.com/excel/CellView.aspx UT wrote: "SUMIF" seems to be obvious choice but it shows a value of 0. Does it matter that I am trying to add numbers imported from a database? Thanks!! "Joel" wrote: Why are you using sumproduct? SumIF should work "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" "UT" wrote: I have a sheet that imports data from a database. In another sheet I want to add the numbers in a column B if the string in column Is "ABC". I have tried different functions such as "=SUMPRODUCT(--(Sheet1!B7:B238="ABC")*Sheet2!D7:D238)" AND "=SUMIF(Sheet1!B7:B238,"ABC",Sheet1!D7:D238)" Nothing seems to work. Any suggestion will be a great help. I am on deadline here. Thanks. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unable to see or show sheet 1 in excel | New Users to Excel | |||
Unable to see or show sheet 1 in excel | New Users to Excel | |||
Unable to see or show sheet 1 in excel | New Users to Excel | |||
Excel unable to sort any numbers | Excel Discussion (Misc queries) | |||
am unable to view or use sheet tabs | New Users to Excel |