Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 184
Default Formula help with having characters in the number

I have a formula in C1 that reads
=IF(RIGHT(A2,1)="+",MID(Sheet1!A2,1,SEARCH("+",She et1!A2)-1)*(B2+0.5),A2*B2).
When you place a 15 in A1 C1 answers 300 where if you put a 15+ in A1 C1
will answer 307.5. The problem I am having is if you put in A3 =Sum(A1:A2)
you will get a 0 or only what is in A2 if you have 15+ in A1. The problem is
from the + how do I fix it so it will add both A1 and A2 if there is a number
and + in A1?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default Formula help with having characters in the number

On Thu, 3 Sep 2009 13:02:02 -0700, Jeremy
wrote:

I have a formula in C1 that reads
=IF(RIGHT(A2,1)="+",MID(Sheet1!A2,1,SEARCH("+",Sh eet1!A2)-1)*(B2+0.5),A2*B2).
When you place a 15 in A1 C1 answers 300 where if you put a 15+ in A1 C1
will answer 307.5. The problem I am having is if you put in A3 =Sum(A1:A2)
you will get a 0 or only what is in A2 if you have 15+ in A1. The problem is
from the + how do I fix it so it will add both A1 and A2 if there is a number
and + in A1?


Try this formula in cell A3:

=SUMPRODUCT(0+SUBSTITUTE(A1:A2,"+",""))

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 184
Default Formula help with having characters in the number

How does this formula know to add .50 to b2 when there is a + after the
number in A1?


"Lars-Åke Aspelin" wrote:

On Thu, 3 Sep 2009 13:02:02 -0700, Jeremy
wrote:

I have a formula in C1 that reads
=IF(RIGHT(A2,1)="+",MID(Sheet1!A2,1,SEARCH("+",Sh eet1!A2)-1)*(B2+0.5),A2*B2).
When you place a 15 in A1 C1 answers 300 where if you put a 15+ in A1 C1
will answer 307.5. The problem I am having is if you put in A3 =Sum(A1:A2)
you will get a 0 or only what is in A2 if you have 15+ in A1. The problem is
from the + how do I fix it so it will add both A1 and A2 if there is a number
and + in A1?


Try this formula in cell A3:

=SUMPRODUCT(0+SUBSTITUTE(A1:A2,"+",""))

Hope this helps / Lars-Åke

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Formula help with having characters in the number

You could try changing the formula to
=SUMPRODUCT(0+SUBSTITUTE(A1:A2,"+",".5"))
--
David Biddulph

Jeremy wrote:
How does this formula know to add .50 to b2 when there is a + after
the number in A1?


"Lars-Åke Aspelin" wrote:

On Thu, 3 Sep 2009 13:02:02 -0700, Jeremy
wrote:

I have a formula in C1 that reads
=IF(RIGHT(A2,1)="+",MID(Sheet1!A2,1,SEARCH("+",She et1!A2)-1)*(B2+0.5),A2*B2).
When you place a 15 in A1 C1 answers 300 where if you put a 15+ in
A1 C1 will answer 307.5. The problem I am having is if you put in
A3 =Sum(A1:A2) you will get a 0 or only what is in A2 if you have
15+ in A1. The problem is from the + how do I fix it so it will
add both A1 and A2 if there is a number and + in A1?


Try this formula in cell A3:

=SUMPRODUCT(0+SUBSTITUTE(A1:A2,"+",""))

Hope this helps / Lars-Åke



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set the number of characters in a column bicheno Excel Discussion (Misc queries) 0 March 28th 07 02:14 AM
Set the number of characters in a column Stefi Excel Discussion (Misc queries) 0 March 28th 07 01:19 AM
Number of Characters for a formula Fred Djinn Holstings Excel Discussion (Misc queries) 6 February 3rd 07 02:02 AM
Number of Characters Murray Excel Discussion (Misc queries) 3 November 6th 06 11:50 PM
Defined number of characters Carrie Excel Discussion (Misc queries) 3 February 2nd 06 05:44 PM


All times are GMT +1. The time now is 12:40 AM.

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

About Us

"It's about Microsoft Excel"