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 » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF cell A1 contains "X", enter "X" in cell B1, if not enter "Y" HE



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2008, 09:14 PM posted to microsoft.public.excel.worksheet.functions
adre77
external usenet poster
 
Posts: 7
Default IF cell A1 contains "X", enter "X" in cell B1, if not enter "Y" HE

The operation I am trying to do is:
If cell A1 contains the word "AMR", I need Excel to show in cell B1 the word
"AMR", if it does not find it, enter the word "Other". The word ‘AMR’ will
not be always in the same position in other cells, it can be located anywhere
(at the beginning, somewhere in the middle or at the end) on the cell.

I tried doing it this way: =IF(A1=*"AMR"*,"AMR","Other")
but I got an error message.

Does anyone know a formula or another way Excel can do this operation?

Any insight would be greatly appreciated.

  #2  
Old December 2nd, 2008, 09:19 PM posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_2_]
external usenet poster
 
Posts: 722
Default IF cell A1 contains "X", enter "X" in cell B1, if not enter "Y" HE

On Tue, 2 Dec 2008 13:14:12 -0800, adre77
wrote:

The operation I am trying to do is:
If cell A1 contains the word "AMR", I need Excel to show in cell B1 the word
"AMR", if it does not find it, enter the word "Other". The word ‘AMR’ will
not be always in the same position in other cells, it can be located anywhere
(at the beginning, somewhere in the middle or at the end) on the cell.

I tried doing it this way: =IF(A1=*"AMR"*,"AMR","Other")
but I got an error message.

Does anyone know a formula or another way Excel can do this operation?

Any insight would be greatly appreciated.



Try this formula:

=IF(ISERROR(FIND("AMR",A1)),"Other","AMR")

Hope this helps / Lars-Åke

  #3  
Old December 2nd, 2008, 09:25 PM posted to microsoft.public.excel.worksheet.functions
Dave
external usenet poster
 
Posts: 2,331
Default IF cell A1 contains "X", enter "X" in cell B1, if not enter "Y" HE

Hi,
perhaps something like:
=IF(FIND("AMR",A1,0)0,"AMR","Other")
Regards - Dave

"adre77" wrote:

The operation I am trying to do is:
If cell A1 contains the word "AMR", I need Excel to show in cell B1 the word
"AMR", if it does not find it, enter the word "Other". The word ‘AMR’ will
not be always in the same position in other cells, it can be located anywhere
(at the beginning, somewhere in the middle or at the end) on the cell.

I tried doing it this way: =IF(A1=*"AMR"*,"AMR","Other")
but I got an error message.

Does anyone know a formula or another way Excel can do this operation?

Any insight would be greatly appreciated.

  #4  
Old December 2nd, 2008, 09:51 PM posted to microsoft.public.excel.worksheet.functions
adre77
external usenet poster
 
Posts: 7
Default IF cell A1 contains "X", enter "X" in cell B1, if not enter "Y

Thanks Dave, I modified a bit your formula =IF(FIND("AMR",B2),"AMR","Other")
and it worked, but only for cells that contain the word "AMR", for the ones
that dont have it, it shows an error value.

The next reply to my question suggested a different formula
=IF(ISERROR(FIND("AMR",B2)),"Other","AMR") that worked ok on every cell.

Thanks again!

"Dave" wrote:

Hi,
perhaps something like:
=IF(FIND("AMR",A1,0)0,"AMR","Other")
Regards - Dave

"adre77" wrote:

The operation I am trying to do is:
If cell A1 contains the word "AMR", I need Excel to show in cell B1 the word
"AMR", if it does not find it, enter the word "Other". The word ‘AMR’ will
not be always in the same position in other cells, it can be located anywhere
(at the beginning, somewhere in the middle or at the end) on the cell.

I tried doing it this way: =IF(A1=*"AMR"*,"AMR","Other")
but I got an error message.

Does anyone know a formula or another way Excel can do this operation?

Any insight would be greatly appreciated.

  #5  
Old December 2nd, 2008, 10:08 PM posted to microsoft.public.excel.worksheet.functions
adre77
external usenet poster
 
Posts: 7
Default IF cell A1 contains "X", enter "X" in cell B1, if not enter "Y

Thanks for the formula Lars-Ã…ke. I have another question:
what if instead of showing the word "other" I need Excel to do another if
statement...Let me explain:
in Column A i have the following:
Reject-AMR & Billing
Check-AMR & Billing-
Billing-Meter Read
Billing-AMR & Check-AMR
Check-Download & Billing- Gas
what i need now is: if it says AMR, show AMR, if it says Meter Read, show
Meter Read, if it says Download, show Download... how can i do this? I am
trying to do several if statements with the formula you sent me, but I can't
seem to find the right formula

-thanks in advance!



"Lars-Ã…ke Aspelin" wrote:

On Tue, 2 Dec 2008 13:14:12 -0800, adre77
wrote:

The operation I am trying to do is:
If cell A1 contains the word "AMR", I need Excel to show in cell B1 the word
"AMR", if it does not find it, enter the word "Other". The word ‘AMR’ will
not be always in the same position in other cells, it can be located anywhere
(at the beginning, somewhere in the middle or at the end) on the cell.

I tried doing it this way: =IF(A1=*"AMR"*,"AMR","Other")
but I got an error message.

Does anyone know a formula or another way Excel can do this operation?

Any insight would be greatly appreciated.



Try this formula:

=IF(ISERROR(FIND("AMR",A1)),"Other","AMR")

Hope this helps / Lars-Ã…ke


 




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:42 PM.


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