A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If Statement



 
 
Thread Tools Display Modes
  #1  
Old May 16th, 2007, 01:16 AM posted to microsoft.public.excel.misc
Secret Squirrel
external usenet poster
 
Posts: 683
Default If Statement

How do I write an "IF" statement to find a cell that has the letter "G" in it.

Example:

HW-G12345

The letter "G" won't always be in the exact spot in each cell.

Any help would be greatly appreciated.
  #2  
Old May 16th, 2007, 01:26 AM posted to microsoft.public.excel.misc
AKphidelt
external usenet poster
 
Posts: 591
Default If Statement

Try this

=IF(ISERROR(FIND("G",A1,1)),"no","yes")

Change A1 to whatever cell the value is that you want to find G in.

"Secret Squirrel" wrote:

How do I write an "IF" statement to find a cell that has the letter "G" in it.

Example:

HW-G12345

The letter "G" won't always be in the exact spot in each cell.

Any help would be greatly appreciated.

  #3  
Old May 16th, 2007, 01:26 AM posted to microsoft.public.excel.misc
RagDyeR
external usenet poster
 
Posts: 3,482
Default If Statement

What exactly do you mean by find?
Do you want the cell address?
Do you want data returned from an adjoining column on the same row?

And where exactly are you searching?
A column?
An array/
The entire sheet?

And will there be duplicates, where you'll want more then a single return?

How about more info.

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Secret Squirrel" wrote in
message news
How do I write an "IF" statement to find a cell that has the letter "G" in
it.

Example:

HW-G12345

The letter "G" won't always be in the exact spot in each cell.

Any help would be greatly appreciated.



  #4  
Old May 16th, 2007, 01:30 AM posted to microsoft.public.excel.misc
Secret Squirrel
external usenet poster
 
Posts: 683
Default If Statement

Perfect! Thanks!

"AKphidelt" wrote:

Try this

=IF(ISERROR(FIND("G",A1,1)),"no","yes")

Change A1 to whatever cell the value is that you want to find G in.

"Secret Squirrel" wrote:

How do I write an "IF" statement to find a cell that has the letter "G" in it.

Example:

HW-G12345

The letter "G" won't always be in the exact spot in each cell.

Any help would be greatly appreciated.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:12 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.