Seamus2626

asked on

# IF Statement

Hi,

I am looking for an IF statement to tell me if on any row in ColA the below two appear more than once, if they do, I would like it ot return the cell reference, if not, leave blank

"GBP"

"EUR"

"USD"

Also i dont know if the IF Statement is the best way, im just presuming.....

Thanks

Seamus

I am looking for an IF statement to tell me if on any row in ColA the below two appear more than once, if they do, I would like it ot return the cell reference, if not, leave blank

"GBP"

"EUR"

"USD"

Also i dont know if the IF Statement is the best way, im just presuming.....

Thanks

Seamus

Actually, a pivot table could tell you this right away.

ASKER

Hi Stepehn,

Any instance of

GBP or

USD or

EUR

Twice on ay row, any where from A1:A65566

Thanks

Seamus

Any instance of

GBP or

USD or

EUR

Twice on ay row, any where from A1:A65566

Thanks

Seamus

you can use a Countif formula in Col B

enter this in B1 '=Countif("A:A",A1)

this will give you a numeric value. if the value is 1 it means the value appears once in Col A

If the value is > than 1, then they are the duplicates. you can filter the columns and see all the duplicates.

enter this in B1 '=Countif("A:A",A1)

this will give you a numeric value. if the value is 1 it means the value appears once in Col A

If the value is > than 1, then they are the duplicates. you can filter the columns and see all the duplicates.

if you are using Excel 2007 or higher, you can also use Conditional Formatting to identify Duplicates.

Go to COnditional Formatting and select Highlight Cell Rules > Duplicate Values.

you can then filter the cells based on color too.

Go to COnditional Formatting and select Highlight Cell Rules > Duplicate Values.

you can then filter the cells based on color too.

ASKER

Perhaps this, must be easier ways though!

=IF(OR(LEN(A1)-LEN(SUBSTITUTE(A1,"gbp",""))>3,LEN(A1)-LEN(SUBSTITUTE(A1,"eur",""))>3,LEN(A1)-LEN(SUBSTITUTE(A1,"usd",""))>3),"A" & ROW(),"")

=IF(OR(LEN(A1)-LEN(SUBSTIT

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

I'm not clear what you are looking for, Seamus,

Do you want a formula you can copy down for every row? If you have 2 instances of "EUR" in one cell does that trigger the condition, or should it be two different currencies out of the 3?

regards, barry

Do you want a formula you can copy down for every row? If you have 2 instances of "EUR" in one cell does that trigger the condition, or should it be two different currencies out of the 3?

regards, barry

ASKER

That didnt quite work Stephen, it flagged two rows which did contain any currencys and missed the one that did.

ColA 195 is an example of what im looking for

Thanks

Seamus

ColA 195 is an example of what im looking for

Thanks

Seamus

Now that Barry has said that, I am wondering myself ...

ASKER

No, it must two instances of the same currency and would prefer that it wasnt an if statement that had to fall all the way down

Thanks

Seamus

Thanks

Seamus

Seamus - my formula does flag up A195 (as well as A37).

ASKER

For some reason Stepehen, its flagging 5 columns down on both instances for me

I.e A42 and A200

Ive enetered the formula into B1 and filled down.

Do you know why this would be?

Scrap that, I know, hiddden rows, this is now a solution

Thanks Stephen,

Thank you too Barry

Cheers,

Seamus

!

I.e A42 and A200

Ive enetered the formula into B1 and filled down.

Do you know why this would be?

Scrap that, I know, hiddden rows, this is now a solution

Thanks Stephen,

Thank you too Barry

Cheers,

Seamus

!

I know this is closed, but here's another possible formula to copy down

=IF(SUM(COUNTIF(A1,"*"&{"EUR","USD","GBP"}&"*"&{"EUR","USD","GBP"}&"*")),ROW(),"")

=IF(SUM(COUNTIF(A1,"*"&{"E

ASKER

That works too Barry, thank you for that.

Cheers,

Seamus

Cheers,

Seamus

"GBP EUR USD GBP EUR USD"

?