Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Natalie
 
Posts: n/a
Default How do I set up an IF function with text and numbers?

I want a function that recognizes if there is the letter X in cell F7, then
K7 = 5; or if there is an X in cell G7 then K7 = 4, or if there is an X in H7
then K7 = 3 and so on.
  #2   Report Post  
Biff
 
Posts: n/a
Default How do I set up an IF function with text and numbers?

Hi!

and so on.


"And so on" implies there are more conditions. How many?

Do this mean that ONLY ONE CELL may contain "X"?

If 2 or more cells contain "X", which cell has precedence?

Biff

"Natalie" wrote in message
...
I want a function that recognizes if there is the letter X in cell F7, then
K7 = 5; or if there is an X in cell G7 then K7 = 4, or if there is an X in
H7
then K7 = 3 and so on.



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default How do I set up an IF function with text and numbers?

In cell K7

=IF(F7="X",5,IF(G7="X",4,IF(H7="X",3,...)))

but there is a limit of 7 nested IFs.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Natalie" wrote in message
...
I want a function that recognizes if there is the letter X in cell F7,

then
K7 = 5; or if there is an X in cell G7 then K7 = 4, or if there is an X in

H7
then K7 = 3 and so on.



  #4   Report Post  
DOR
 
Posts: n/a
Default How do I set up an IF function with text and numbers?

If the 7 nested IFs ever present a problem, this formula can be
extended beyond 7 columns,

=IF(ISNA(MATCH("X",F7:J7,0)),"",COLUMNS(F7:J7)+1-MATCH("X",F7:J7,0)) in
K7

It chooses the result based on the first X encountered in the range
under test, reading from left to right.

HTH

  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default How do I set up an IF function with text and numbers?

DOR wrote...
If the 7 nested IFs ever present a problem, this formula can be
extended beyond 7 columns,

=IF(ISNA(MATCH("X",F7:J7,0)),"",COLUMNS(F7:J7)+ 1-MATCH("X",F7:J7,0)) in
K7

....

You could shorten this to

=IF(COUNTIF(F7:J7,"X"),COLUMNS(F7:J7)+1-MATCH("X",F7:J7,0),"")



  #6   Report Post  
DOR
 
Posts: n/a
Default How do I set up an IF function with text and numbers?

Thx Hrln, u hv a way w brvty <g

  #7   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default How do I set up an IF function with text and numbers?

On Tue, 8 Nov 2005 13:55:03 -0800, "Natalie"
wrote:

I want a function that recognizes if there is the letter X in cell F7, then
K7 = 5; or if there is an X in cell G7 then K7 = 4, or if there is an X in H7
then K7 = 3 and so on.


Assuming the leftmost column has priority if there are multiple X's, and
assuming the contents of the cell is only an X (and not, for example, eXcite),
then:

K7: =CHOOSE(MATCH("X",F7:F7:J7,0),5,4,3,2,1)


--ron
  #8   Report Post  
Harlan Grove
 
Posts: n/a
Default How do I set up an IF function with text and numbers?

Ron Rosenfeld wrote...
....
Assuming the leftmost column has priority if there are multiple X's, and
assuming the contents of the cell is only an X (and not, for example, eXcite),
then:

K7: =CHOOSE(MATCH("X",F7:F7:J7,0),5,4,3,2,1)


Yeah, but it's effectively hardcoded. insert columns between F and J
and put the leftmost X in the 6th column.

If hardcoding, zero return value for no X in the range, and array
formulas were OK,

=MAX(IF(F7:J7="X",{5,4,3,2,1}))

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
Convert text numbers to numbers Barb Excel Worksheet Functions 4 October 22nd 05 07:18 PM
convert numbers to text bellman Excel Discussion (Misc queries) 0 October 4th 05 10:28 PM
numbers to text function John T. Sheedy Excel Worksheet Functions 2 March 8th 05 03:13 PM
Converting Numbers to Text properly Shirley Munro Excel Discussion (Misc queries) 1 February 16th 05 04:01 PM
how to format numbers stored as text or vice versa to use vlookup teneagle Excel Worksheet Functions 1 February 3rd 05 11:41 PM


All times are GMT +1. The time now is 11:28 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"