+ Reply to Thread
Results 1 to 5 of 5

Need better way than an infinite IF formula

  1. #1
    Registered User
    Join Date
    03-18-2015
    Location
    Canada
    MS-Off Ver
    Mac
    Posts
    3

    Need better way than an infinite IF formula

    Hello,

    My situation is this: I have a cell (referred to as Cell A) that will end up being really any number positive or negative. Depending on what cell A is, certain financing needs to take place in multiples of $5000's that bring that balance back over 0 or nothing if it is already above zero. I've figured out how to use an if statement to do this but I can't infinitely go down and keep adding multiples of 5000.

    Similarily, if Cell A is greater than 1000 it needs to pay off the financing in another line in multiple of $1000's. I've created a sub-schedule to take care of interest, principal remaining, etc so I just need the basics.

    Here's an idea of what the format looks like:

    Cash excess (deficit): Cell A - determined by previous cells that don't matter
    Financing: (need formula) - multiples of 5000 to bring cell a over 0
    Financing Repayment: (need formula) - multiples of 1000 if cell a has enough to cover without going below 0

    Thank you.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,607

    Re: Need better way than an infinite IF formula

    To attach a Workbook
    (please do not post pictures or links to worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Need better way than an infinite IF formula

    This formula will give you the number of multiples of 5000:

    =INT(cellA/5000)

    You might need a +1 at the end so that if cellA = 7,500 it will return 2 instead of 1 (for example). You can then multiply all that by 5000 to get the amount needed, i.e.:

    =(INT(cellA/5000) +1)*5000

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    03-18-2015
    Location
    Canada
    MS-Off Ver
    Mac
    Posts
    3

    Re: Need better way than an infinite IF formula

    Attached an example worksheet (real one cannot be shared). So the first financing cell needs to equal 30000 to be correct.

    Unfortunately Pete_UK that didn't seem to be what I was looking for. I appreciate your help though.

    Edit: Actually Pete_UK I think that might be the right track for the first one. I believe =-INT(B168/5000)*5000 is the right formula for the first part except I can't have positve numbers leading to financing. So can I use an if statement to seperate positive from negative?
    Attached Files Attached Files
    Last edited by bcolville; 03-18-2015 at 07:39 PM.

  5. #5
    Registered User
    Join Date
    03-18-2015
    Location
    Canada
    MS-Off Ver
    Mac
    Posts
    3

    Re: Need better way than an infinite IF formula

    Here's my new formula which I believe to be correct for the first one: =IF(B168<0,-INT(B168/5000)*5000,0)
    I'm assuming the second part would use a very similar formula, I'll work on it. Thanks for the help

+ 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. Why is my loop infinite, and how can I fix it?
    By Mrowe in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-13-2012, 02:48 PM
  2. [SOLVED] VBA infinite loop
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-13-2012, 12:20 PM
  3. Formula - assign number1 to infinite
    By Damian84 in forum Excel General
    Replies: 1
    Last Post: 03-27-2012, 11:23 AM
  4. Transferring value from an infinite number of sheets instead of formula.
    By d-bird in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-01-2011, 04:23 PM
  5. Infinite IF function?
    By atarikick in forum Excel General
    Replies: 2
    Last Post: 11-18-2009, 12:20 PM

Tags for this Thread

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