ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Statement (https://www.excelbanter.com/excel-discussion-misc-queries/142883-if-statement.html)

Secret Squirrel

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.

AKphidelt

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.


RagDyeR

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 ...
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.




Secret Squirrel

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.



All times are GMT +1. The time now is 07:28 PM.

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