ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sumif vs Text? (https://www.excelbanter.com/excel-worksheet-functions/138913-sumif-vs-text.html)

Ken

Sumif vs Text?
 
Excel2003 ... Sample

Cell A2 ... Fred
Cell B2 ... 31
Range D5:D10 ... Various Names (people ... including "Fred")
Col F ... Formula ... =sumif(D5:D10,A2,B2) ... Keeps returning "0"

Where I find "Fred" in Col D ... I want to place the "31" in Col F adjacent
to Fred ... I am sure it is simple ... but I have tried all kinds of
girations with the A2 .. AND I am just not getting it (Friday the 13th?) ...
:( ... Thanks ... Kha


PCLIVE

Sumif vs Text?
 
Your sum range appears to only be returning "B2".

Try this:

=SUMIF(D5:D10,A2,B5:B10)

HTH,
Paul

"Ken" wrote in message
...
Excel2003 ... Sample

Cell A2 ... Fred
Cell B2 ... 31
Range D5:D10 ... Various Names (people ... including "Fred")
Col F ... Formula ... =sumif(D5:D10,A2,B2) ... Keeps returning "0"

Where I find "Fred" in Col D ... I want to place the "31" in Col F
adjacent
to Fred ... I am sure it is simple ... but I have tried all kinds of
girations with the A2 .. AND I am just not getting it (Friday the 13th?)
...
:( ... Thanks ... Kha




Elkar

Sumif vs Text?
 
It doesn't sound like you really want to do a SUM here though. I think just
an IF statement will get the results you've described.

In F5, enter:

=IF(D5=$A$2,$B$2,"")

Copy this formula down through F10.

Is that what you're looking for?

HTH,
Elkar


"Ken" wrote:

Excel2003 ... Sample

Cell A2 ... Fred
Cell B2 ... 31
Range D5:D10 ... Various Names (people ... including "Fred")
Col F ... Formula ... =sumif(D5:D10,A2,B2) ... Keeps returning "0"

Where I find "Fred" in Col D ... I want to place the "31" in Col F adjacent
to Fred ... I am sure it is simple ... but I have tried all kinds of
girations with the A2 .. AND I am just not getting it (Friday the 13th?) ...
:( ... Thanks ... Kha


Mike

Sumif vs Text?
 

=IF(A2="FRED",31,"Unknown")
"Ken" wrote:

Excel2003 ... Sample

Cell A2 ... Fred
Cell B2 ... 31
Range D5:D10 ... Various Names (people ... including "Fred")
Col F ... Formula ... =sumif(D5:D10,A2,B2) ... Keeps returning "0"

Where I find "Fred" in Col D ... I want to place the "31" in Col F adjacent
to Fred ... I am sure it is simple ... but I have tried all kinds of
girations with the A2 .. AND I am just not getting it (Friday the 13th?) ...
:( ... Thanks ... Kha


Ron Coderre

Sumif vs Text?
 
I'm a bit puzzled about your requirements, but I'll see if this is what
you're looking to do....

In Col_A, you have a list of unique names
In Col_B, you have numeric values associated with each name

Col_D has a list of names, possibly some names repeated.

In Col_F, you want to find the name from Col_D in the list in Col_A and
return the corresponding value from Col_B.

If that's true....try something like this.

Where D4: Fred
This formula will return the value associated with Fred
F4: =VLOOKUP(D4,$A$1:$B$10,2,0)
Copy that formula down as far as you need.

Am I on the right track here, or do you need something else?

Post back with more questions or clarifications
***********
Regards,
Ron

XL2002, WinXP


"Ken" wrote:

Excel2003 ... Sample

Cell A2 ... Fred
Cell B2 ... 31
Range D5:D10 ... Various Names (people ... including "Fred")
Col F ... Formula ... =sumif(D5:D10,A2,B2) ... Keeps returning "0"

Where I find "Fred" in Col D ... I want to place the "31" in Col F adjacent
to Fred ... I am sure it is simple ... but I have tried all kinds of
girations with the A2 .. AND I am just not getting it (Friday the 13th?) ...
:( ... Thanks ... Kha


Teethless mama

Sumif vs Text?
 
=IF(COUNTIF(D5:D10,A2),B2,"")


"Ken" wrote:

Excel2003 ... Sample

Cell A2 ... Fred
Cell B2 ... 31
Range D5:D10 ... Various Names (people ... including "Fred")
Col F ... Formula ... =sumif(D5:D10,A2,B2) ... Keeps returning "0"

Where I find "Fred" in Col D ... I want to place the "31" in Col F adjacent
to Fred ... I am sure it is simple ... but I have tried all kinds of
girations with the A2 .. AND I am just not getting it (Friday the 13th?) ...
:( ... Thanks ... Kha


Ken

Sumif vs Text?
 
Yes ... I found my way there ... Thanks ... Kha

"Teethless mama" wrote:

=IF(COUNTIF(D5:D10,A2),B2,"")


"Ken" wrote:

Excel2003 ... Sample

Cell A2 ... Fred
Cell B2 ... 31
Range D5:D10 ... Various Names (people ... including "Fred")
Col F ... Formula ... =sumif(D5:D10,A2,B2) ... Keeps returning "0"

Where I find "Fred" in Col D ... I want to place the "31" in Col F adjacent
to Fred ... I am sure it is simple ... but I have tried all kinds of
girations with the A2 .. AND I am just not getting it (Friday the 13th?) ...
:( ... Thanks ... Kha



All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com