Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF Then
I'm trying to create a formula that would look in a column of another tab for
one of two last names and if it equaled a name then it would look in another column for a dollar amount and add it to the cell. For example; If Tab 1 column A equals Champ then add column C and if Tab 2 column A equals Champ then add column D. Thanks for your help in advance. -- Respectfully, Rick Champ |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF Then
Rick,
I'm afraid your question is a bit lacking on clarity in that you don't say what you want if neither cell contains champ or if both do. So as a guess try this:- =IF(AND(A1="Champ",Sheet2!A1="Champ"),C1&D1,IF(A1= "Champ",C1,IF(Sheet2!A1="Champ",D1,"You didn't say"))) Mike "Rick Champ" wrote: I'm trying to create a formula that would look in a column of another tab for one of two last names and if it equaled a name then it would look in another column for a dollar amount and add it to the cell. For example; If Tab 1 column A equals Champ then add column C and if Tab 2 column A equals Champ then add column D. Thanks for your help in advance. -- Respectfully, Rick Champ |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF Then
It sounds like you could use =vlookup() or =index(match()).
Debra Dalgleish has lots of notes on =vlookup() and =index(match()) he http://www.contextures.com/xlFunctions02.html (for =vlookup()) and http://www.contextures.com/xlFunctions03.html (for =index(match())) I would bring back the value in a separate column, then use that returned value in a formula in another column: A2 contains Champ B2 contains whatever C2 contains a number of something D2 contains a formula to bring a value back: =if(isna(vlookup(a2,sheet2!a:c,3,false)),0,vlookup (a2,sheet2!a:c,3,false)) E2 contains a formula that returns the sum of column C and D. =sum(c2:d2) Rick Champ wrote: I'm trying to create a formula that would look in a column of another tab for one of two last names and if it equaled a name then it would look in another column for a dollar amount and add it to the cell. For example; If Tab 1 column A equals Champ then add column C and if Tab 2 column A equals Champ then add column D. Thanks for your help in advance. -- Respectfully, Rick Champ -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF Then
Ps. If you're using xl2007, you could use =iferror() instead of using
=vlookup() twice in that formula. Rick Champ wrote: I'm trying to create a formula that would look in a column of another tab for one of two last names and if it equaled a name then it would look in another column for a dollar amount and add it to the cell. For example; If Tab 1 column A equals Champ then add column C and if Tab 2 column A equals Champ then add column D. Thanks for your help in advance. -- Respectfully, Rick Champ -- Dave Peterson |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF Then
if I am reading what you want correctly and Tab 1 and Tab 2 are different
sheets =sumif('Tab 1"!A:A,"Name 1",'Tab 1'!C:C)+sumif('Tab 2"!A:A,"Name 1",'Tab 2'!D:D)+sumif('Tab 1"!A:A,"Name 2",'Tab 1'!C:C)+sumif('Tab 2"!A:A,"Name 2",'Tab 2'!D:D) if you want the C and D columns form the same shet as the equation is in then =sumif('Tab 1"!A:A,"Name 1",C:C)+sumif('Tab 2"!A:A,"Name 1",D:D)+sumif('Tab 1"!A:A,"Name 2",C:C)+sumif('Tab 2"!A:A,"Name 2",!D:D) "Rick Champ" wrote: I'm trying to create a formula that would look in a column of another tab for one of two last names and if it equaled a name then it would look in another column for a dollar amount and add it to the cell. For example; If Tab 1 column A equals Champ then add column C and if Tab 2 column A equals Champ then add column D. Thanks for your help in advance. -- Respectfully, Rick Champ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|