+ Reply to Thread
Results 1 to 4 of 4

Formula to take the first amount in a column with a value other than 0

  1. #1
    Registered User
    Join Date
    08-25-2008
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    80

    Formula to take the first amount in a column with a value other than 0

    So, anyone that knows how NOL's work in taxes will understand what I'm going through. I have a list of amounts starting in column O through column AH. In some rows the first three columns (O, P & Q) may be blank, then the next column (R) and the columns after it may have values. What I want to do is if there is an amount in column N, let's say $100, I want it to subtract that $100 from the first cell on the same row that has an value other than 0 in it. If that value is $75, then I want it to continue going to the right until it finds the next cell with a value, and remove the remaining $25 from it.

    Looking at the attachment, if there is an amount in column A, I want it to subtract that amount from the first value that appears in the corresponding row. For example, row 36 has an amount of 1,926,369. The first value on that row is 257,193. I want it to zero out that first amount because it doesn't completely cover the original amount, and whatever is left (1,926,369-257,193=1,669,176) I want to be applied to the next value, which would be cell k36 (1,669,176).

    The only way I can think of doing this is using a large IF formula, but I'm thinking there must be an easier way.

    Thanks for looking!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Formula to take the first amount in a column with a value other than 0

    Well for a start off, unless you want to create a 2nd table to run this in, there is no formula that will look at the value in J36, subtract that from the value in A36, andthen replace J36 with 0. J36 would then be 0 and the formula would then subtract 0 from A36, instead of 257 193.

    I think your only other option here would be VBA
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-25-2008
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    80

    Re: Formula to take the first amount in a column with a value other than 0

    I appreciate your input. Could you, or someone else, help me with VBA? I've never used it before. Or would it be too much trouble and/or too complicated for something like this?

    Thanks

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Formula to take the first amount in a column with a value other than 0

    Thanks for the feedback

    I will move this to the VBA forum for better exposure

+ 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] Need a formula for an amount in a column that is just 2 columns subracted from one another
    By laurabach in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-30-2013, 11:17 PM
  2. [SOLVED] In pivot match vertical row amount with the horizontal column -amount and highlight that
    By Goku in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2013, 02:04 AM
  3. Replies: 12
    Last Post: 02-01-2013, 04:53 PM
  4. Replies: 7
    Last Post: 12-19-2012, 04:11 PM
  5. Replies: 16
    Last Post: 05-04-2005, 04:26 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