Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
rrr rrr is offline
external usenet poster
 
Posts: 9
Default How do I assign a numeric value to text? IE cell = yes then 1

I am trying to create a simple list in a cell: YES or NO. Then I want to
sum the row of YES or NO's. If I can assign a value of 1 to YES and 0 to NO
I can do the math. Not sure how to assign a numeric value to a short list of
text in a cell to enable this math operation.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default How do I assign a numeric value to text? IE cell = yes then 1

Try something like this:

With
A1:A20 containing "Yes" and "No" values

This formula returns the count of "Yes" values
B1: =COUNTIF(A1:A20,"Yes")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

I am trying to create a simple list in a cell: YES or NO. Then I want to
sum the row of YES or NO's. If I can assign a value of 1 to YES and 0 to NO
I can do the math. Not sure how to assign a numeric value to a short list of
text in a cell to enable this math operation.

  #3   Report Post  
Posted to microsoft.public.excel.misc
rrr rrr is offline
external usenet poster
 
Posts: 9
Default How do I assign a numeric value to text? IE cell = yes then

Hi Ron,

Thank you very much. Works great. May I ask you a second related question?

Randy

"Ron Coderre" wrote:

Try something like this:

With
A1:A20 containing "Yes" and "No" values

This formula returns the count of "Yes" values
B1: =COUNTIF(A1:A20,"Yes")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

I am trying to create a simple list in a cell: YES or NO. Then I want to
sum the row of YES or NO's. If I can assign a value of 1 to YES and 0 to NO
I can do the math. Not sure how to assign a numeric value to a short list of
text in a cell to enable this math operation.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default How do I assign a numeric value to text? IE cell = yes then

Thanks for the feedback......I'm glad you could use that.

Regarding:
May I ask you a second related question?


Of course! What's the question?

***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

Hi Ron,

Thank you very much. Works great. May I ask you a second related question?

Randy

"Ron Coderre" wrote:

Try something like this:

With
A1:A20 containing "Yes" and "No" values

This formula returns the count of "Yes" values
B1: =COUNTIF(A1:A20,"Yes")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

I am trying to create a simple list in a cell: YES or NO. Then I want to
sum the row of YES or NO's. If I can assign a value of 1 to YES and 0 to NO
I can do the math. Not sure how to assign a numeric value to a short list of
text in a cell to enable this math operation.

  #5   Report Post  
Posted to microsoft.public.excel.misc
rrr rrr is offline
external usenet poster
 
Posts: 9
Default How do I assign a numeric value to text? IE cell = yes then

In the same row (where there are cells with YES and NO values) I would like
to incorporate a value from text in one additional cell. In that cell I've
build a list with three word values: SIMPLE STANDARD or COMPLEX. If that
cell is blank it should count as 0 similar to the blank or" NO" cell from
before. But if the word in that cell is SIMPLE is should count as 1, if
STANDARD then 2, but if COMPLEX s/b 1 again....same as SIMPLE.

Any ideas?

"Ron Coderre" wrote:

Thanks for the feedback......I'm glad you could use that.

Regarding:
May I ask you a second related question?


Of course! What's the question?

***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

Hi Ron,

Thank you very much. Works great. May I ask you a second related question?

Randy

"Ron Coderre" wrote:

Try something like this:

With
A1:A20 containing "Yes" and "No" values

This formula returns the count of "Yes" values
B1: =COUNTIF(A1:A20,"Yes")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

I am trying to create a simple list in a cell: YES or NO. Then I want to
sum the row of YES or NO's. If I can assign a value of 1 to YES and 0 to NO
I can do the math. Not sure how to assign a numeric value to a short list of
text in a cell to enable this math operation.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default How do I assign a numeric value to text? IE cell = yes then

Maybe something like this?:

For a value, or blank, in A1

B1: =LOOKUP(A1&"",{"","Complex","Simple","Standard"},{ 0,1,1,2})
Note: The list within the first set of braces { } must be in ascending sort
order

OR
Alternatively, if there will be more than a few of these formulas you should
drive the values via a table.

Example:
F1:F3 contains this list
Complex
Simple
Standard

G1:G3 contains this list
1
1
2

B1: =SUMPRODUCT(COUNTIF(A1,$F$1:$F$3)*$G$1:$G$3)
Note: That may not be a standard solution, but it is durable against
non-list entries, blanks, and numbers.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

In the same row (where there are cells with YES and NO values) I would like
to incorporate a value from text in one additional cell. In that cell I've
build a list with three word values: SIMPLE STANDARD or COMPLEX. If that
cell is blank it should count as 0 similar to the blank or" NO" cell from
before. But if the word in that cell is SIMPLE is should count as 1, if
STANDARD then 2, but if COMPLEX s/b 1 again....same as SIMPLE.

Any ideas?

"Ron Coderre" wrote:

Thanks for the feedback......I'm glad you could use that.

Regarding:
May I ask you a second related question?


Of course! What's the question?

***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

Hi Ron,

Thank you very much. Works great. May I ask you a second related question?

Randy

"Ron Coderre" wrote:

Try something like this:

With
A1:A20 containing "Yes" and "No" values

This formula returns the count of "Yes" values
B1: =COUNTIF(A1:A20,"Yes")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

I am trying to create a simple list in a cell: YES or NO. Then I want to
sum the row of YES or NO's. If I can assign a value of 1 to YES and 0 to NO
I can do the math. Not sure how to assign a numeric value to a short list of
text in a cell to enable this math operation.

  #7   Report Post  
Posted to microsoft.public.excel.misc
rrr rrr is offline
external usenet poster
 
Posts: 9
Default How do I assign a numeric value to text? IE cell = yes then

Ron,

That is absolutely terrific. Thank you. I will apply this to my sheet and
it will be much improved.

Thank you sir!

Randy

PS Let me know if I can do anything more to attach positive feedback to you.

"Ron Coderre" wrote:

Maybe something like this?:

For a value, or blank, in A1

B1: =LOOKUP(A1&"",{"","Complex","Simple","Standard"},{ 0,1,1,2})
Note: The list within the first set of braces { } must be in ascending sort
order

OR
Alternatively, if there will be more than a few of these formulas you should
drive the values via a table.

Example:
F1:F3 contains this list
Complex
Simple
Standard

G1:G3 contains this list
1
1
2

B1: =SUMPRODUCT(COUNTIF(A1,$F$1:$F$3)*$G$1:$G$3)
Note: That may not be a standard solution, but it is durable against
non-list entries, blanks, and numbers.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

In the same row (where there are cells with YES and NO values) I would like
to incorporate a value from text in one additional cell. In that cell I've
build a list with three word values: SIMPLE STANDARD or COMPLEX. If that
cell is blank it should count as 0 similar to the blank or" NO" cell from
before. But if the word in that cell is SIMPLE is should count as 1, if
STANDARD then 2, but if COMPLEX s/b 1 again....same as SIMPLE.

Any ideas?

"Ron Coderre" wrote:

Thanks for the feedback......I'm glad you could use that.

Regarding:
May I ask you a second related question?

Of course! What's the question?

***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

Hi Ron,

Thank you very much. Works great. May I ask you a second related question?

Randy

"Ron Coderre" wrote:

Try something like this:

With
A1:A20 containing "Yes" and "No" values

This formula returns the count of "Yes" values
B1: =COUNTIF(A1:A20,"Yes")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

I am trying to create a simple list in a cell: YES or NO. Then I want to
sum the row of YES or NO's. If I can assign a value of 1 to YES and 0 to NO
I can do the math. Not sure how to assign a numeric value to a short list of
text in a cell to enable this math operation.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default How do I assign a numeric value to text? IE cell = yes then

PS Let me know if I can do anything more to attach positive feedback to you.

Honestly, Randy, your appreciation is reward enough. Thanks for the kind
words.

***********
Sincerely,
Ron

XL2002, WinXP


"rrr" wrote:

Ron,

That is absolutely terrific. Thank you. I will apply this to my sheet and
it will be much improved.

Thank you sir!

Randy

PS Let me know if I can do anything more to attach positive feedback to you.

"Ron Coderre" wrote:

Maybe something like this?:

For a value, or blank, in A1

B1: =LOOKUP(A1&"",{"","Complex","Simple","Standard"},{ 0,1,1,2})
Note: The list within the first set of braces { } must be in ascending sort
order

OR
Alternatively, if there will be more than a few of these formulas you should
drive the values via a table.

Example:
F1:F3 contains this list
Complex
Simple
Standard

G1:G3 contains this list
1
1
2

B1: =SUMPRODUCT(COUNTIF(A1,$F$1:$F$3)*$G$1:$G$3)
Note: That may not be a standard solution, but it is durable against
non-list entries, blanks, and numbers.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

In the same row (where there are cells with YES and NO values) I would like
to incorporate a value from text in one additional cell. In that cell I've
build a list with three word values: SIMPLE STANDARD or COMPLEX. If that
cell is blank it should count as 0 similar to the blank or" NO" cell from
before. But if the word in that cell is SIMPLE is should count as 1, if
STANDARD then 2, but if COMPLEX s/b 1 again....same as SIMPLE.

Any ideas?

"Ron Coderre" wrote:

Thanks for the feedback......I'm glad you could use that.

Regarding:
May I ask you a second related question?

Of course! What's the question?

***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

Hi Ron,

Thank you very much. Works great. May I ask you a second related question?

Randy

"Ron Coderre" wrote:

Try something like this:

With
A1:A20 containing "Yes" and "No" values

This formula returns the count of "Yes" values
B1: =COUNTIF(A1:A20,"Yes")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"rrr" wrote:

I am trying to create a simple list in a cell: YES or NO. Then I want to
sum the row of YES or NO's. If I can assign a value of 1 to YES and 0 to NO
I can do the math. Not sure how to assign a numeric value to a short list of
text in a cell to enable this math operation.

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
clicking cell containing text, and a numeric value appear in anoth Graham Allen Excel Discussion (Misc queries) 1 September 4th 06 09:22 PM
Text entries behaving like numbers jkiser Excel Discussion (Misc queries) 12 August 30th 06 09:29 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Assign values to text within a cell Bob Excel Worksheet Functions 2 June 7th 05 09:51 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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