Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Simple if statment just not coming to me

Working to hard and cant figure out this

in cell H2 - If cell (c2) begins with ABC then state "yes" if not state "no"

Sorry I know its simple but for some reason its not coming to me

Thanks in advance for your help

--
Nelson
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default Simple if statment just not coming to me

=IF(LEFT(C2,3)="ABC","Yes","No")

"Nelson" wrote:

Working to hard and cant figure out this

in cell H2 - If cell (c2) begins with ABC then state "yes" if not state "no"

Sorry I know its simple but for some reason its not coming to me

Thanks in advance for your help

--
Nelson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Simple if statment just not coming to me

THANKS, however now I have a follow up if I may

I need to add another variable

so if C2 begins with ABC say "YES ABC" if it begins with DEF say "Yes DEF"
anything else say "NO"

How would that work, I tried ORs but again its not coming to me?

Thanks in advanvce






--
Nelson


"Sam Wilson" wrote:

=IF(LEFT(C2,3)="ABC","Yes","No")

"Nelson" wrote:

Working to hard and cant figure out this

in cell H2 - If cell (c2) begins with ABC then state "yes" if not state "no"

Sorry I know its simple but for some reason its not coming to me

Thanks in advance for your help

--
Nelson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default Simple if statment just not coming to me

=IF(LEFT(A1,3)="ABC","Yes ABC",IF(LEFT(A1,3)="DEF","Yes DEF","No"))

"Nelson" wrote:

THANKS, however now I have a follow up if I may

I need to add another variable

so if C2 begins with ABC say "YES ABC" if it begins with DEF say "Yes DEF"
anything else say "NO"

How would that work, I tried ORs but again its not coming to me?

Thanks in advanvce






--
Nelson


"Sam Wilson" wrote:

=IF(LEFT(C2,3)="ABC","Yes","No")

"Nelson" wrote:

Working to hard and cant figure out this

in cell H2 - If cell (c2) begins with ABC then state "yes" if not state "no"

Sorry I know its simple but for some reason its not coming to me

Thanks in advance for your help

--
Nelson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Simple if statment just not coming to me

Give this a try...

=IF(OR(LEFT(A1,3)={"ABC","DEF"}),"Yes "&A1,"No")

If you can enter lower or mixed case "ABC" and/or "DEF", and if you always
want upper case "ABC" and/or "DEF" following the word "Yes", then use this
instead...

=IF(OR(LEFT(A1,3)={"ABC","DEF"}),"Yes "&UPPER(A1),"No")

--
Rick (MVP - Excel)


"Nelson" wrote in message
...
THANKS, however now I have a follow up if I may

I need to add another variable

so if C2 begins with ABC say "YES ABC" if it begins with DEF say "Yes DEF"
anything else say "NO"

How would that work, I tried ORs but again its not coming to me?

Thanks in advanvce






--
Nelson


"Sam Wilson" wrote:

=IF(LEFT(C2,3)="ABC","Yes","No")

"Nelson" wrote:

Working to hard and cant figure out this

in cell H2 - If cell (c2) begins with ABC then state "yes" if not state
"no"

Sorry I know its simple but for some reason its not coming to me

Thanks in advance for your help

--
Nelson


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
If statment Cerealkiller via OfficeKB.com Excel Discussion (Misc queries) 5 May 28th 10 10:09 PM
if statment Dreamstar_1961 Excel Worksheet Functions 5 April 17th 07 01:30 PM
If statment if its possible. atb Excel Discussion (Misc queries) 2 October 17th 06 05:50 PM
If statment helpdesk genie Excel Worksheet Functions 2 January 12th 05 03:23 AM
if statment bob Excel Programming 1 August 3rd 03 10:45 AM


All times are GMT +1. The time now is 05:44 PM.

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"