+ Reply to Thread
Results 1 to 6 of 6

Long IF string?

  1. #1
    Registered User
    Join Date
    07-14-2013
    Location
    california
    MS-Off Ver
    Excel 2016
    Posts
    70

    Long IF string?

    What would the formula be for the following:
    if column A is:
    >0 column B would be 10%
    >18551 column B would be 15%
    >73301 column B would be 25%
    >151901 column B would be 28%
    >231451 column B would be 33%
    >413351 column B would be 35%
    >466951 column B would be 39.6%

    Thank You

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,703

    Re: Long IF string?

    Best way is to create a lookup table and use VLOOKUP.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-14-2013
    Location
    california
    MS-Off Ver
    Excel 2016
    Posts
    70

    Re: Long IF string?

    Thanks, would you please provide the formula
    Thanks

  4. #4
    Registered User
    Join Date
    07-14-2013
    Location
    california
    MS-Off Ver
    Excel 2016
    Posts
    70

    Re: Long IF string?

    I created the table, but am having trouble with the formula. Please see attached example
    Thanks
    Attached Files Attached Files

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,725

    Re: Long IF string?

    I removed the leading ">" from the lookup table.

    In C2 and filled down this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.





    B
    C
    D
    E
    F
    G
    1
    Amount
    Appropriate column G # from the table
    Table array
    2
    19000
    0.15
    0
    0.1
    3
    75000
    0.25
    18551
    0.15
    4
    250000
    0.33
    73301
    0.25
    5
    300000
    0.33
    151901
    0.28
    6
    420000
    0.35
    231451
    0.33
    7
    413351
    0.35
    8
    466951
    0.396
    Dave

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,725

    Re: Long IF string?


+ 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] String in VBA too long
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-08-2012, 10:05 PM
  2. Breaking up a long string
    By bitswit in forum Excel General
    Replies: 2
    Last Post: 11-23-2011, 05:19 AM
  3. String function to get selective text from long string
    By MWHLFC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2011, 02:51 PM
  4. string function to get selective text from long string
    By MWHLFC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2011, 05:00 PM
  5. [SOLVED] Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a)
    By Brian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2006, 11:45 AM
  6. Importing Long String - String Manipulation (EDI EANCOM 96a)
    By Brian in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-09-2006, 08:30 AM
  7. [SOLVED] From String to Long
    By MD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2005, 12:05 PM

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