ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   letter case? (https://www.excelbanter.com/excel-discussion-misc-queries/118493-letter-case.html)

pacent

letter case?
 
How might I create an IF formula to recognize whether text in a column is
lower or upper case so that the text-related values may be added or
subtracted based on the case of the text? For example, I have text in B1:B50
whose complimenting values I would like to + or - from the values attributed
to the text in D1:D50 depending on the case of that text.

Gary''s Student

letter case?
 
If there is a single character in A1 then:

=IF(AND(CODE(A1)64,CODE(A1)<91),"upper","lower")


--
Gary's Student


"pacent" wrote:

How might I create an IF formula to recognize whether text in a column is
lower or upper case so that the text-related values may be added or
subtracted based on the case of the text? For example, I have text in B1:B50
whose complimenting values I would like to + or - from the values attributed
to the text in D1:D50 depending on the case of that text.


Bob Phillips

letter case?
 
You can test it like so

=EXACT(B1,LOWER(B1))

or

=EXACT(B1,UPPER(B1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"pacent" wrote in message
...
How might I create an IF formula to recognize whether text in a column is
lower or upper case so that the text-related values may be added or
subtracted based on the case of the text? For example, I have text in

B1:B50
whose complimenting values I would like to + or - from the values

attributed
to the text in D1:D50 depending on the case of that text.




pacent

letter case?
 
How about for all caps?


"Gary''s Student" wrote:

If there is a single character in A1 then:

=IF(AND(CODE(A1)64,CODE(A1)<91),"upper","lower")


--
Gary's Student


"pacent" wrote:

How might I create an IF formula to recognize whether text in a column is
lower or upper case so that the text-related values may be added or
subtracted based on the case of the text? For example, I have text in B1:B50
whose complimenting values I would like to + or - from the values attributed
to the text in D1:D50 depending on the case of that text.


pacent

letter case?
 
Allow me to clarify my ? -- the text is ALL CAPS vs Capitalized (not entirely
lower case). Is it possible?


"Gary''s Student" wrote:

If there is a single character in A1 then:

=IF(AND(CODE(A1)64,CODE(A1)<91),"upper","lower")


--
Gary's Student


"pacent" wrote:

How might I create an IF formula to recognize whether text in a column is
lower or upper case so that the text-related values may be added or
subtracted based on the case of the text? For example, I have text in B1:B50
whose complimenting values I would like to + or - from the values attributed
to the text in D1:D50 depending on the case of that text.


Gary''s Student

letter case?
 
Bob Phillips has the correct approach:

=IF(EXACT(A1,UPPER(A1)),"all upper",IF(EXACT(A1,LOWER(A1)),"all
lower","mixed"))

--
Gary's Student


"pacent" wrote:

Allow me to clarify my ? -- the text is ALL CAPS vs Capitalized (not entirely
lower case). Is it possible?


"Gary''s Student" wrote:

If there is a single character in A1 then:

=IF(AND(CODE(A1)64,CODE(A1)<91),"upper","lower")


--
Gary's Student


"pacent" wrote:

How might I create an IF formula to recognize whether text in a column is
lower or upper case so that the text-related values may be added or
subtracted based on the case of the text? For example, I have text in B1:B50
whose complimenting values I would like to + or - from the values attributed
to the text in D1:D50 depending on the case of that text.



All times are GMT +1. The time now is 05:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com