Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

IF Statement

Posted on 2011-02-11
16
Medium Priority
?
229 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:Seamus2626
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
  • +2
16 Comments
 
LVL 24

Expert Comment

by:StephenJR
ID: 34870853
So you mean each of those three occur more than once in a cell in col A, e.g. in A1
"GBP EUR USD GBP EUR USD"
?
0
 
LVL 8

Expert Comment

by:ragnarok89
ID: 34870879
Actually, a pivot table could tell you this right away.
0
 

Author Comment

by:Seamus2626
ID: 34870882
Hi Stepehn,

Any instance of

GBP or
USD or
EUR

Twice on ay row, any where from A1:A65566

Thanks
Seamus
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 20

Expert Comment

by:Ardhendu Sarangi
ID: 34870885
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.
0
 
LVL 20

Expert Comment

by:Ardhendu Sarangi
ID: 34870899
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.
0
 

Author Comment

by:Seamus2626
ID: 34870916
Hi guys,

I attached the ss

Its Col A
CP-Report.zip
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 34870937
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(),"")
0
 
LVL 24

Accepted Solution

by:
StephenJR earned 2000 total points
ID: 34870965
Actually, it is case-sensitive so should be:

=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(),"")
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34871001
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
0
 

Author Comment

by:Seamus2626
ID: 34871008
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
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 34871010
Now that Barry has said that, I am wondering myself ...
0
 

Author Comment

by:Seamus2626
ID: 34871014
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
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 34871052
Seamus - my formula does flag up A195 (as well as A37).
0
 

Author Closing Comment

by:Seamus2626
ID: 34871100
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

!
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34871332
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(),"")
0
 

Author Comment

by:Seamus2626
ID: 34871370
That works too Barry, thank you for that.

Cheers,
Seamus
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question