Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Can I use a between clause or in clause on an IF statement

I have this statement in a cell:

=IF(RIGHT(C12,1)="1",TEXT(0,"00")

Which states that when C12 last digit ends in a 1 then put 00 in C13

I want to do the same if C12 last digit ends in [A]-[E] I know how to do it
in SQL not in Excel programming though.

thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Can I use a between clause or in clause on an IF statement

=IF(OR(RIGHT(C12,1)="1",AND(UPPER(RIGHT(C12,1))=" A",UPPER(RIGHT(C12,1))<="E")),"00","")

--
Regards,
Tom Ogilvy


"ssciarrino" wrote:

I have this statement in a cell:

=IF(RIGHT(C12,1)="1",TEXT(0,"00")

Which states that when C12 last digit ends in a 1 then put 00 in C13

I want to do the same if C12 last digit ends in [A]-[E] I know how to do it
in SQL not in Excel programming though.

thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Can I use a between clause or in clause on an IF statement

Thanks tom

"Tom Ogilvy" wrote:

=IF(OR(RIGHT(C12,1)="1",AND(UPPER(RIGHT(C12,1))=" A",UPPER(RIGHT(C12,1))<="E")),"00","")

--
Regards,
Tom Ogilvy


"ssciarrino" wrote:

I have this statement in a cell:

=IF(RIGHT(C12,1)="1",TEXT(0,"00")

Which states that when C12 last digit ends in a 1 then put 00 in C13

I want to do the same if C12 last digit ends in [A]-[E] I know how to do it
in SQL not in Excel programming though.

thanks


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
PERCENTILE with an IF Clause Zeelotes Excel Worksheet Functions 3 April 19th 23 02:11 PM
IF Clause dpal Excel Worksheet Functions 8 July 19th 07 07:32 PM
IF Clause juergenkemeter[_2_] Excel Programming 6 January 10th 06 11:17 PM
"Between" in an IF clause gavin Excel Discussion (Misc queries) 5 May 2nd 05 09:27 PM
Where Clause Errors Pete T[_2_] Excel Programming 0 October 20th 03 04:11 PM


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