+ Reply to Thread
Results 1 to 7 of 7

Subtracting Column Values determined by another cell value

  1. #1
    Registered User
    Join Date
    12-15-2014
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    3

    Unhappy Subtracting Column Values determined by another cell value

    Hi there,

    I'm trying to create an inventory table on our stock.

    Everyday there will be inventory produced and delivered out.

    eg.

    A1 to A10 is incoming stock
    B1 to B10 is outgoing stock
    C1 to C10 is Stock remaining.

    (A1-B1=C1, C2=C1+A2-B2 etc....)

    The problem is that my inventory has cure time before sending out. Let's say, I have a cell which I can key in like '5' days cure time, the Stock remaining at C10 will minus away those produced in the last 5 days (incoming) meaning from B10,B9,B8,B7,B6 and the results at Row 10 which is where the stock remaining is will change accordingly to what I keyed in which in this example is '5'.

    How do I link formulas up?

  2. #2
    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,431

    Re: Subtracting Column Values determined by another cell value

    Welcome to the forum!

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.


    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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.

  3. #3
    Registered User
    Join Date
    12-15-2014
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    3

    Re: Subtracting Column Values determined by another cell value

    Noted. First post. Sorry.

    I've attached a basic document. On the first Tab, it stated 7-3 days cure time. I want to remove it to save rows and a formula which I can key in to see how much stock I have.
    Attached Files Attached Files

  4. #4
    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,431

    Re: Subtracting Column Values determined by another cell value

    You have missed the most vital part:

    2. Make sure that your desired results are also shown (mock up the results manually).
    We really don't need to see the complete project - just a sample sheet showing what you are trying to achieve.

  5. #5
    Registered User
    Join Date
    12-15-2014
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    3

    Re: Subtracting Column Values determined by another cell value

    noted.

    as attached once again. Sorry.
    Attached Files Attached Files

  6. #6
    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,431

    Re: Subtracting Column Values determined by another cell value

    That's much clearer - thanks. I have run out of time for now, but someone will take a look soon.

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

    Re: Subtracting Column Values determined by another cell value

    Sawasdee

    The minus part is H7
    =SUM(INDEX($C4:H4,MAX(1,COLUMNS($C4:H4)-$L$5+1)):H4)

    Not sure how you get 163 G5+G6 = 23+139 = 162
    Attached Files Attached Files

+ 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. Formula to total cell values within a range determined by combination of other cells.
    By Victorthesecond in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2018, 01:17 PM
  2. VBA Form Textbox Format Determined by Values of a Cell
    By Jonny117 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 12-22-2017, 11:17 AM
  3. user-determined adding of cell values in a column: code breaks down after 2 cells
    By simz92 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2017, 05:12 AM
  4. [SOLVED] Construct a formula on a pre-determined cell for a pre-determined duration of cells
    By Shaun Gemiver in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-03-2013, 11:14 AM
  5. 100% Stacked Column Bar Chart color determined by a cell value
    By peterputter in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-03-2012, 08:47 AM
  6. Subtracting column values based on another column having a date in it
    By laptopgraveyard in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 02-10-2012, 05:44 AM
  7. Macro - Hiding Columns determined by cell values
    By Stammski in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2007, 01:54 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