Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Matt
 
Posts: n/a
Default Text to equal "0"

I have a column and in Row 1 I need the average, Row 2 the Minimum & Row 3
the Max.

I allow the user to input from rows 6 - 37 and my formulas are as follows:

Row1: =AVERAGE(A6:A37)
Row2: =MIN(A6:A37)
Row3: =MAX(A6:A37)

this works as it should however I have a value of "bdl" that a user may
input and I need that to equal zero for the formulas to work correctly
I cannot just enter zero as "bdl" is an acronym for below defined limits and
gov regulations require that it read as such. I thought I could use an IF
statement in the formula but I cannot get it to work.

I appreciate all help in this equation and thank you for your time.

MM

  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=AVERAGE(--SUBSTITUTE(a6:a37,"bdl",0))
array entered (ctrl+shift+enter)

same way for the other functions


"Matt" wrote in message
...
I have a column and in Row 1 I need the average, Row 2 the Minimum & Row 3
the Max.

I allow the user to input from rows 6 - 37 and my formulas are as follows:

Row1: =AVERAGE(A6:A37)
Row2: =MIN(A6:A37)
Row3: =MAX(A6:A37)

this works as it should however I have a value of "bdl" that a user may
input and I need that to equal zero for the formulas to work correctly
I cannot just enter zero as "bdl" is an acronym for below defined limits
and
gov regulations require that it read as such. I thought I could use an IF
statement in the formula but I cannot get it to work.

I appreciate all help in this equation and thank you for your time.

MM



  #3   Report Post  
Matt
 
Posts: n/a
Default

Looked good to me but ,
I pasted that in my field for the averages and I get :

#VALUE!




"N Harkawat" wrote:

=AVERAGE(--SUBSTITUTE(a6:a37,"bdl",0))
array entered (ctrl+shift+enter)

same way for the other functions


"Matt" wrote in message
...
I have a column and in Row 1 I need the average, Row 2 the Minimum & Row 3
the Max.

I allow the user to input from rows 6 - 37 and my formulas are as follows:

Row1: =AVERAGE(A6:A37)
Row2: =MIN(A6:A37)
Row3: =MAX(A6:A37)

this works as it should however I have a value of "bdl" that a user may
input and I need that to equal zero for the formulas to work correctly
I cannot just enter zero as "bdl" is an acronym for below defined limits
and
gov regulations require that it read as such. I thought I could use an IF
statement in the formula but I cannot get it to work.

I appreciate all help in this equation and thank you for your time.

MM




  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Just a heads up, if the OP has any blank cells your formula will return an
error,
it can also be solved as

=AVERAGE(IF(A6:A37="bdl",0,IF(A6:A37<"",A6:A37)))

array entered

Of course if there never are any blanks your formula will work fine




regards,

Peo Sjoblom

"N Harkawat" wrote:

=AVERAGE(--SUBSTITUTE(a6:a37,"bdl",0))
array entered (ctrl+shift+enter)

same way for the other functions


"Matt" wrote in message
...
I have a column and in Row 1 I need the average, Row 2 the Minimum & Row 3
the Max.

I allow the user to input from rows 6 - 37 and my formulas are as follows:

Row1: =AVERAGE(A6:A37)
Row2: =MIN(A6:A37)
Row3: =MAX(A6:A37)

this works as it should however I have a value of "bdl" that a user may
input and I need that to equal zero for the formulas to work correctly
I cannot just enter zero as "bdl" is an acronym for below defined limits
and
gov regulations require that it read as such. I thought I could use an IF
statement in the formula but I cannot get it to work.

I appreciate all help in this equation and thank you for your time.

MM




  #5   Report Post  
Matt
 
Posts: n/a
Default

ah-ha

Thanks so much.



"Peo Sjoblom" wrote:

Just a heads up, if the OP has any blank cells your formula will return an
error,
it can also be solved as

=AVERAGE(IF(A6:A37="bdl",0,IF(A6:A37<"",A6:A37)))

array entered

Of course if there never are any blanks your formula will work fine




regards,

Peo Sjoblom

"N Harkawat" wrote:

=AVERAGE(--SUBSTITUTE(a6:a37,"bdl",0))
array entered (ctrl+shift+enter)

same way for the other functions


"Matt" wrote in message
...
I have a column and in Row 1 I need the average, Row 2 the Minimum & Row 3
the Max.

I allow the user to input from rows 6 - 37 and my formulas are as follows:

Row1: =AVERAGE(A6:A37)
Row2: =MIN(A6:A37)
Row3: =MAX(A6:A37)

this works as it should however I have a value of "bdl" that a user may
input and I need that to equal zero for the formulas to work correctly
I cannot just enter zero as "bdl" is an acronym for below defined limits
and
gov regulations require that it read as such. I thought I could use an IF
statement in the formula but I cannot get it to work.

I appreciate all help in this equation and thank you for your time.

MM






  #6   Report Post  
CLR
 
Posts: n/a
Default

The first formula also crashes if there is any other TEXT in the range
besides the "bdl"...............whereas Peo's formula works fine.

Vaya con Dios,
Chuck, CABGx3


"Matt" wrote in message
...
ah-ha

Thanks so much.



"Peo Sjoblom" wrote:

Just a heads up, if the OP has any blank cells your formula will return

an
error,
it can also be solved as

=AVERAGE(IF(A6:A37="bdl",0,IF(A6:A37<"",A6:A37)))

array entered

Of course if there never are any blanks your formula will work fine




regards,

Peo Sjoblom

"N Harkawat" wrote:

=AVERAGE(--SUBSTITUTE(a6:a37,"bdl",0))
array entered (ctrl+shift+enter)

same way for the other functions


"Matt" wrote in message
...
I have a column and in Row 1 I need the average, Row 2 the Minimum &

Row 3
the Max.

I allow the user to input from rows 6 - 37 and my formulas are as

follows:

Row1: =AVERAGE(A6:A37)
Row2: =MIN(A6:A37)
Row3: =MAX(A6:A37)

this works as it should however I have a value of "bdl" that a user

may
input and I need that to equal zero for the formulas to work

correctly
I cannot just enter zero as "bdl" is an acronym for below defined

limits
and
gov regulations require that it read as such. I thought I could use

an IF
statement in the formula but I cannot get it to work.

I appreciate all help in this equation and thank you for your time.

MM






  #7   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=SUM(A6:A37)/(COUNT(A6:A37)+COUNTIF(A6:A37,"bdl"))

=CHOOSE(IF(COUNTIF(A6:A37,"bdl"),1,2),MIN(A6:A37,0 ),MIN(A6:A37))

=CHOOSE(IF(COUNTIF(A6:A37,"bdl"),1,2),MAX(A6:A37,0 ),MAX(A6:A37))

Matt wrote:
I have a column and in Row 1 I need the average, Row 2 the Minimum & Row 3
the Max.

I allow the user to input from rows 6 - 37 and my formulas are as follows:

Row1: =AVERAGE(A6:A37)
Row2: =MIN(A6:A37)
Row3: =MAX(A6:A37)

this works as it should however I have a value of "bdl" that a user may
input and I need that to equal zero for the formulas to work correctly
I cannot just enter zero as "bdl" is an acronym for below defined limits and
gov regulations require that it read as such. I thought I could use an IF
statement in the formula but I cannot get it to work.

I appreciate all help in this equation and thank you for your time.

MM

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
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 12:25 AM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 07:22 PM
How can I get text to equal a numerical value in Excel? Mighty Mike Excel Discussion (Misc queries) 2 January 21st 05 08:03 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 09:21 PM.

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"