A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

sumif concatenate formula



 
 
Thread Tools Display Modes
  #1  
Old March 17th, 2010, 10:45 PM posted to microsoft.public.excel.worksheet.functions
Robb27
external usenet poster
 
Posts: 14
Default sumif concatenate formula

I have 3 cells in a row. We'll call them cell 1, 2 & 3. I need a formula in
cell 3 that is based on what is in cells 1 and 2. Example:

1 - If there is a letter "A" in cell 1 or 2, then concatenate cells 1 and 2
in cell 3.
2 - If there is number in cell 1 and 2, then sum cells 1 and 2 in cell 3.

Thanks for your help.

Rob
  #2  
Old March 17th, 2010, 11:09 PM posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_4_]
external usenet poster
 
Posts: 74
Default sumif concatenate formula

On Wed, 17 Mar 2010 14:45:03 -0700, Robb27
wrote:

I have 3 cells in a row. We'll call them cell 1, 2 & 3. I need a formula in
cell 3 that is based on what is in cells 1 and 2. Example:

1 - If there is a letter "A" in cell 1 or 2, then concatenate cells 1 and 2
in cell 3.
2 - If there is number in cell 1 and 2, then sum cells 1 and 2 in cell 3.

Thanks for your help.

Rob



If cell 1 is cell A1 and cell 2 is cell A2, try this formula in cell
3:

=IF(OR(A1="A",A2="A"),A1&A2,IF(AND(ISNUMBER(A1),IS NUMBER(A2)),A1+A2,""))

Hope this helps / Lars-Åke

  #3  
Old March 18th, 2010, 02:39 AM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default sumif concatenate formula

=IF(COUNT(A1:B1)=2,A1+B1,IF(OR(A1="A",B1="A"),A1&B 1,""))


"Robb27" wrote:

I have 3 cells in a row. We'll call them cell 1, 2 & 3. I need a formula in
cell 3 that is based on what is in cells 1 and 2. Example:

1 - If there is a letter "A" in cell 1 or 2, then concatenate cells 1 and 2
in cell 3.
2 - If there is number in cell 1 and 2, then sum cells 1 and 2 in cell 3.

Thanks for your help.

Rob

  #4  
Old March 18th, 2010, 02:39 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default sumif concatenate formula

Try this...

=IF(COUNT(A1:B1)=2,A1+B1,IF(OR(A1="A",B1="A"),A1&B 1,""))

--
Biff
Microsoft Excel MVP


"Robb27" wrote in message
...
I have 3 cells in a row. We'll call them cell 1, 2 & 3. I need a formula in
cell 3 that is based on what is in cells 1 and 2. Example:

1 - If there is a letter "A" in cell 1 or 2, then concatenate cells 1 and
2
in cell 3.
2 - If there is number in cell 1 and 2, then sum cells 1 and 2 in cell 3.

Thanks for your help.

Rob



  #5  
Old March 18th, 2010, 10:36 PM posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_4_]
external usenet poster
 
Posts: 74
Default sumif concatenate formula

On Thu, 18 Mar 2010 14:59:03 +0000, Robb27
wrote:


Lars-Åke Aspelin;674606 Wrote:

On Wed, 17 Mar 2010 14:45:03 -0700, Robb27
wrote:

I have 3 cells in a row. We'll call them cell 1, 2 & 3. I need a

formula in
cell 3 that is based on what is in cells 1 and 2. Example:

1 - If there is a letter "A" in cell 1 or 2, then concatenate cells 1

and 2
in cell 3.
2 - If there is number in cell 1 and 2, then sum cells 1 and 2 in cell

3.

Thanks for your help.

Rob



If cell 1 is cell A1 and cell 2 is cell A2, try this formula in cell
3:

=IF(OR(A1="A",A2="A"),A1&A2,IF(AND(ISNUMBER(A1),IS NUMBER(A2)),A1+A2,""))

Hope this helps / Lars-Åke




Hi Lars-Ake,

Your formula in cell A3 worked great. Here is another question for you
if you don't mind.

Here is an example:
Cell A1 Cell A2 Cell A3 Cell A4
50 9 9 18 #N/A


I have your formula in cell A3 - In cell A4 I have this formula:
INDEX(Basic_Strategy_Chart!$B$2:$K$41,MATCH(AN9,B asic_Strategy_Chart!$A$2:$A$41,0),MATCH(D9,Basic_S trategy_Chart!$B$1:$K$1,0))

My problem now is I can't figure out why my formula in Cell A4 returns
an N/A result. This happens whenever I have 2 of the same number in A1
and A2. When there are different numbers in A1 and A2, or if there is an
"A" in one of the cells, my formula works great. Can you see a problem,
or do I need to send you my sheet for your review? Let me know. and
thanks for your help.

Rob



You will get the #N/A error if either of the MATCH functions will not
find their respective lookup value in their respective lookup array.
So, what formulas do you have in the cells AN9 and D9?
Obviously something that, directly or indirectly, uses the values of
cells A1 or A2.

Lars-Åke
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.