+ Reply to Thread
Results 1 to 2 of 2

Substitute function within an if statement?

  1. #1
    Registered User
    Join Date
    09-12-2014
    Location
    DC
    MS-Off Ver
    Windows 7
    Posts
    1

    Substitute function within an if statement?

    Hi,

    I'm trying to write an easy formula that I can imbed within a formula that returns a value from another sheet:

    =IF(ISBLANK('Raw Data'!H36),"",'Raw Data'!H36)

    That formula will return the revenues of companies (stored on another sheet), but some of these pulled values are written incorrectly, ie as "5k" or "5bil" instead of 5000 or 5000000000. Is there a way to imbed a substitute/replace function within my original "if" statement? I don't want to just manually do find and replace, since this is a large and rather complicated data set. Thanks!!

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Substitute function within an if statement?

    Maybe like this

    =LOOKUP(1E+307,0+LEFT(A1,ROW(A$1:A$10000)))*LOOKUP(2^15,SEARCH({"K","Mil","Bil"},A1),{1000,1000000,1000000000})

    A
    B
    1
    105K
    105,000
    2
    120Mil
    120,000,000
    3
    25Bil
    25,000,000,000
    4
    135K
    135,000
    5
    173K
    173,000
    6
    2300Mil
    230,000,000
    Last edited by AlKey; 09-12-2014 at 11:54 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Substitute For with a With Statement
    By WmBarth in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2014, 05:44 AM
  2. SUBSTITUTE Function for a range
    By kimikittiekat in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-10-2014, 02:57 PM
  3. [SOLVED] SUBSTITUTE Function
    By Onceageordie in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-23-2013, 09:26 AM
  4. How to substitute a variable in a statement
    By paulmac66 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-07-2013, 12:36 PM
  5. substitute function
    By mrggutz in forum Excel General
    Replies: 2
    Last Post: 02-18-2011, 08:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1