+ Reply to Thread
Results 1 to 9 of 9

Formula to have a number in a column go to zero, if adjacent cell goes to zero

  1. #1
    Registered User
    Join Date
    04-23-2019
    Location
    U.S.
    MS-Off Ver
    Excel 2016
    Posts
    70

    Formula to have a number in a column go to zero, if adjacent cell goes to zero

    I'm creating a debt reduction spreadsheet based on the Snowball debt reduction model. What I'm hoping to be able to do is have (the month number) in a cell (which is in the months it takes to pay off a debt column) go to zero, once the adjacent cell (in the balance owed column) goes to zero. Does anyone know a formula to do this? In my layman language it would be worded as: "When B10 is zero, then A10 displays zero".

    I'm currently using the =MAX(A:A) formula to display the highest number in the months column (which is 120 because the spreadsheet months column goes to 120) in a cell that I will link to another form. However, this MAX formula is only useful in this case if the months number stops displaying once the debt of a particular creditor is paid. So, let's say it will take 24 months to pay a debt, then I want all months past 24 to go to zero so that the MAX formula displays 24.

    I've included the spreadsheet so that anyone who can help can see in the spreadsheet what I'm talking about.

    I've also included a screen pic with further details.

    Thanks,
    Bryan

    PS This is the first time I have tried to add an attachment and the attachment button doesn't seem to be working properly. Perhaps someone can help me with that too. : )
    Last edited by BryanHCR; 05-01-2019 at 06:43 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Formula to have a number in a column go to zero, if adjacent cell goes to zero

    The Icon to attach a file does not work.

    Click on the "go advanced" icon to open the advanced options and then select "Manage Attachments"
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    04-23-2019
    Location
    U.S.
    MS-Off Ver
    Excel 2016
    Posts
    70

    Smile Re: Formula to have a number in a column go to zero, if adjacent cell goes to zero

    Hi mehmetcik,

    Thanks so much for responding. I added the attachments as best as I could see how. Not sure if they will show up when I post this, as nothing is showing up in this window. Bit of a learning curve for me here.

    I liked your "rules for engagement" Say "Please & Thank you" "Make requests not demands" etc. I write about the importance of these ways of relating in my book, so they especially got my attention. And wow, over 6400 post for you, that's very impressive so I feel privileged that you responded to my request for help. Let's see how those attachment go! Thanks again!

    I now see that the attachments worked! I tried to add a reputation point, clicked on the * and it "informed" me I had 10 reputation points, but I don't think it added any to you...

    I took another look at my .jpg attachment, and need to note a correction. On the .jpg image I say Column "B" which is the months column, should stop displaying at 5, but that number should be 4, because that is the amount of time it will take to pay off that Creditor, which would then mean the MAX (B:B) formula would display the number "4" in D6.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by BryanHCR; 05-02-2019 at 01:38 AM.

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,221

    Re: Formula to have a number in a column go to zero, if adjacent cell goes to zero

    "d6"
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Formula to have a number in a column go to zero, if adjacent cell goes to zero

    Please try at D6
    =COUNTIF(C$9:C$128,">0")+1

    or B9 copy down
    =IF(C8>0,ROWS(B$9:B9),"")

  6. #6
    Registered User
    Join Date
    04-23-2019
    Location
    U.S.
    MS-Off Ver
    Excel 2016
    Posts
    70

    Re: Formula to have a number in a column go to zero, if adjacent cell goes to zero

    Hi Bo_Ry,

    Thanks so much for your response! This formula you gave =IF(C8>0,ROWS(B$9:B9),"") is the one that worked. Super helpful and has me smiling!

    Thanks again!

    PS Wish I could send some points or merits your way, but I can't see how to do that...

    PSS I won't change status to solved quite yet, because I still need to do more testing, but I'm pretty sure you've given me what I need, and I'll post the final results sometime later today.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula to have a number in a column go to zero, if adjacent cell goes to zero

    @ BryanHCR
    PS Wish I could send some points or merits your way, but I can't see how to do that...
    See the star and "Add Reputation" in the lower left pane of Bo_Ry's post in question. Click that. You can also add optional comment.
    Dave

  8. #8
    Registered User
    Join Date
    04-23-2019
    Location
    U.S.
    MS-Off Ver
    Excel 2016
    Posts
    70

    Re: Formula to have a number in a column go to zero, if adjacent cell goes to zero

    Thanks Dave, I couldn't see the Add Reputation until I clicked on a "bar" and the windows expanded. Yesterday the * wasn't working, but today it did.
    Also, I'd like to set this thread to solved, but can no longer locate/see where to do that...

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,240

    Re: Formula to have a number in a column go to zero, if adjacent cell goes to zero

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Replies: 5
    Last Post: 11-19-2018, 01:52 AM
  2. [SOLVED] If number in Column A matches number in column B - Copy B cell and adjacent cells ?
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-16-2014, 12:30 PM
  3. [SOLVED] Text in a cell, then formula to put a particular number in adjacent cell
    By jojo101 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-17-2014, 09:09 AM
  4. [SOLVED] count number of cells in Column C that have a lesser or equal value to the adjacent cell
    By Geoff Jones in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-18-2013, 11:01 AM
  5. Replies: 1
    Last Post: 07-01-2013, 11:31 PM
  6. [SOLVED] macro to autofil formula based on number of rows on adjacent column
    By kramtelbuab in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2013, 08:28 PM
  7. Replies: 3
    Last Post: 09-13-2012, 10:34 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