LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Conditional formula with text and number in cell

An alternative that wouldn't be constrained by nested IFs.

=IF(OR(VALUE(LEFT(E2,FIND(" ",E2)))={5,10,1}),
VALUE(LEFT(E2,FIND(" ",E2))),"Not 5, 10, or 1")



"Sheeloo" wrote in message
...
Rich,

Try
=IF(E2="5 okay/strong",5,IF(E2="10 strong",10,IF(E2="1 weak",1,"not 5, 10
or
1")))

Essentially you put another IF in the False condition of the previous
IF...
Excel 2003 has a limit of 7 nested IFs.

The above is like the following (just to explain... not valid syntax)
=IF(cond1, cond1 true, IF(cond2, cond2 true, IF(cond3, cond3 true, cond1 &
cond2 & comd3 all false)))

"RichM" wrote:

Hi Gord,

I hope you don't mind, one more question. I want to put a string of these
conditions together and did this: =IF(E2="5 okay/strong",5,"not 5
okay/strong",if(e2="10 strong",10,"not 10 strong",if(e2="1 weak",1,"not 1
weak")))

But it doesn't work. Can you tell me what would work? Thanks again for
your
help.

"Gord Dibben" wrote:

=IF(B1="10 weak",10,"not 10 weak")

BTW............10 weak what's?

10 weak kittens?

10 weak cups of tea?


Gord Dibben MS Excel MVP

On Sat, 29 May 2010 11:47:01 -0700, RichM

wrote:

Hello,

Can a conditional formula be written to convert a cell with text and a
number to a cellw ith just a number?

I have a cell with the number 10 and the word "weak" in it. 10 weak

Can a conditional formula convert this to just the number "10"? I did
=If(b1= 10 weak,"10") but it does not work.

Thank you.

.


 
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
Test whether formula in cell is an expression or a number/text Fred Holmes Excel Worksheet Functions 3 June 10th 09 06:18 PM
How do I attach a number to a cell with text to use in a formula? Glen Excel Discussion (Misc queries) 1 March 19th 09 03:51 AM
Excel Formula, text & number in cell Need a Guru Excel Discussion (Misc queries) 1 December 29th 08 10:11 PM
number and text in cell for formula paulg Excel Worksheet Functions 6 August 21st 08 04:41 PM
conditional formatting - problem with text cell value from formula PBcorn Excel Worksheet Functions 2 April 18th 08 11:39 AM


All times are GMT +1. The time now is 08:25 AM.

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

About Us

"It's about Microsoft Excel"