Upper Function as Condition

pto160

Active Member
Joined
Feb 1, 2009
Messages
482
Office Version
  1. 365
Platform
  1. Windows
Is there a way to write a condition to say that if a cell is upper, then put text "Upper" otherwise "Lower? I can only seem to make a cell upper not test it as a condition?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Is there a way to write a condition to say that if a cell is upper, then put text "Upper" otherwise "Lower? I can only seem to make a cell upper not test it as a condition?
Try something like this...

=IF(EXACT(A1,UPPER(A1)),"Upper","Not Upper")
 
Upvote 0
Don't think Biff's solution will work if the 1st letter of the string is only upper, if thats what you only needed then the below will work..

Maybe try - will only work if the 1st letter of string is upper

=IF(EXACT(A1,PROPER(A1))=TRUE,"UPPER","NOT UPPER")
 
Upvote 0
Don't think Biff's solution will work if the 1st letter of the string is only upper, if thats what you only needed then the below will work..

Maybe try

=IF(EXACT(A1,PROPER(A1))=TRUE,"UPPER","NOT UPPER")
I'm pretty sure my suggestion does what the OP asked for.

Can you show me an example where it fails?

There's a big difference in what the UPPER function does and what the PROPER function does.
 
Upvote 0
I'm pretty sure my suggestion does what the OP asked for.

Can you show me an example where it fails?

There's a big difference in what the UPPER function does and what the PROPER function does.

Hey Biff,

See below, if the 1st letter is only Upper and the rest not than it will throw back not upper. However if the OP's requirement is that it will always be all upper than yes solution would be suffice.

<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD></TD><TD>A</TD><TD>B</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>Hi</TD><TD>Not Upper</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>there</TD><TD>Not Upper</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD>YES</TD><TD>Upper</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD>no</TD><TD>Not Upper</TD></TR></TBODY></TABLE>
<TABLE style="BORDER-BOTTOM-STYLE: groove; BORDER-BOTTOM-COLOR: #00ff00; BACKGROUND-COLOR: #fffcf9; BORDER-TOP-COLOR: #00ff00; BORDER-LEFT-STYLE: groove; FONT-FAMILY: Arial; BORDER-TOP-STYLE: groove; COLOR: #000000; BORDER-RIGHT-COLOR: #00ff00; BORDER-RIGHT-STYLE: groove; FONT-SIZE: 10pt; BORDER-LEFT-COLOR: #00ff00"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" border=1 cellSpacing=0 cellPadding=2><TBODY><TR style="BACKGROUND-COLOR: #cacaca; FONT-SIZE: 10pt"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>B1</TD><TD>=IF(EXACT(A1,UPPER(A1)),"Upper","Not Upper")</TD></TR><TR><TD>B2</TD><TD>=IF(EXACT(A2,UPPER(A2)),"Upper","Not Upper")</TD></TR><TR><TD>B3</TD><TD>=IF(EXACT(A3,UPPER(A3)),"Upper","Not Upper")</TD></TR><TR><TD>B4</TD><TD>=IF(EXACT(A4,UPPER(A4)),"Upper","Not Upper")</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
 
Upvote 0
I'm pretty sure my suggestion does what the OP asked for.

Can you show me an example where it fails?

There's a big difference in what the UPPER function does and what the PROPER function does.
Argh!

You edited your post so what I quoted no longer relates to my reply!

In any event, the formula I suggested does what the OP asked for.

If all the characters in the cell are in upper case then the formula returns "Upper" otherwise it returns "Not Upper".

I'm assuming that the cell will contain TEXT only.
 
Upvote 0
Argh!

You edited your post so what I quoted no longer relates to my reply!

In any event, the formula I suggested does what the OP asked for.

If all the characters in the cell are in upper case then the formula returns "Upper" otherwise it returns "Not Upper".

I'm assuming that the cell will contain TEXT only.

Cool - glad we sorted that out.
 
Upvote 0
Yes, I was looking for all the letters in the word to be upper, otherwise lower. Thank you both for all your help.
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,547
Members
452,925
Latest member
duyvmex

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top