CP030: Detecting fraud in data using Excel – 5 techniques for you

Share

Facebook
Twitter
LinkedIn

In the 30th session of Chandoo.org podcast, let’s learn how to uncover fraud in data.

How to detect fraud in data - 5 techniques for you - CP030 -  Chandoo.org podcast

What is in this session?

In the wake of hedge fund scams, accounting frauds and globalization, We, analysts are constantly second guessing every source of data. So how do you answer a simple question like, “am I being lied to?” while looking at a set of numbers your supplier has sent you.

Here is an email Peter, one of our readers, sent me last week:

Dear Mr. Chandoo

Shown numbers are measurements from a certain industry process. They are sent to me from a subcontractor. I have to validate these numbers. But am I being lied to? Did they make up the values themselves?
Values can be between 1 and 6 per contract. They are not necessarily normal distributed because of different batches.

That got me thinking?

That is our topic for this podcast session.

In this podcast, you will learn

  • Quick announcements about 50 ways & 200k BRM
  • Introduction to fraud detection
  • 5 techniques for detecting fraud
    • Benford’s law
    • Auto correlation
    • Discontinuity at zero
    • Analysis of distribution
    • Learning systems & decision trees
  • Implementing these techniques in Excel
  • A word of caution

Listen to this session

Click here to download the MP3 file.

 

Links & Resources mentioned in this podcast

50 ways to analyze data course:

Fraud Analysis theory & examples

Commonly occurring distributions

  • Normal distribution
  • Poisson distribution
  • Exponential distribution
  • Binomial distribution

Excel formulas & features to help you with fraud analysis

  • SUMIFS / COUNTIFS formula
  • FREQUENCY() function
  • Data Analysis Toolpak (enable this free add-in from Developer > Add-ins)
  • CORREL() function

Transcript of this session:

Download this podcast transcript [PDF]

How do you detect fraud?

I never had to detect fraud. So when Peter sent that email, I learned about it by researching. Based on the little I know about this field, my personal favorites are Benford’s law, distribution analysis, discontinuity at expected value.

What about you? Do you deal with data that has certain amount of fraud? How do you detect and analyze it? Please share your suggestions & tips in comments area.

Subscribe to our podcast and get latest episodes automatically

Use below link to add our podcast to iTunes. For other options (Android, Windows phone or RSS) click the link below. Thank you.

Other options to subscribe

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

6 Responses to “Make VBA String Comparisons Case In-sensitive [Quick Tip]”

  1. Rick Rothstein (MVP - Excel) says:

    Another way to test if Target.Value equal a string constant without regard to letter casing is to use the StrCmp function...

    If StrComp("yes", Target.Value, vbTextCompare) = 0 Then
    ' Do something
    End If

    • Fares Al-Dhabbi says:

      That's a cool way to compare. i just converted my values to strings and used the above code to compare. worked nicely

      Thanks!

  2. Tim says:

    In case that option just needs to be used for a single comparison, you could use

    If InStr(1, "yes", Target.Value, vbTextCompare) Then
    'do something
    End If

    as well.

  3. Luke M says:

    Nice tip, thanks! I never even thought to think there might be an easier way.

  4. Cyril Z. says:

    Regarding Chronology of VB in general, the Option Compare pragma appears at the very beginning of VB, way before classes and objects arrive (with VB6 - around 2000).

    Today StrComp() and InStr() function offers a more local way to compare, fully object, thus more consistent with object programming (even if VB is still interpreted).

    My only question here is : "what if you want to binary compare locally with re-entering functions or concurrency (with events) ?". This will lead to a real nightmare and probably a big nasty mess to debug.

    By the way, congrats for you Millions/month visits 🙂

  5. Bhavik says:

    This is nice article.
    I used these examples to help my understanding. Even Instr is similar to Find but it can be case sensitive and also case insensitive.
    Hope the examples below help.

    Public Sub CaseSensitive2()

    If InStr(1, "Look in this string", "look", vbBinaryCompare) = 0 Then
    MsgBox "woops, no match"
    Else
    MsgBox "at least one match"
    End If

    End Sub

    Public Sub CaseSensitive()

    If InStr("Look in this string", "look") = 0 Then
    MsgBox "woops, no match"
    Else
    MsgBox "at least one match"
    End If

    End Sub
    Public Sub NotCaseSensitive()
    'doing alot of case insensitive searching and whatnot, you can put Option Compare Text
    If InStr(1, "Look in this string", "look", vbTextCompare) = 0 Then
    MsgBox "woops, no match"
    Else
    MsgBox "at least one match"
    End If

    End Sub

Leave a Reply