+ Reply to Thread
Results 1 to 11 of 11

Need a formula to add diference column

  1. #1
    Forum Contributor
    Join Date
    01-09-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    MS 365
    Posts
    124

    Need a formula to add diference column

    Dear Experts,

    need your help in attached sheet. i have created purchase vs consumption sheet date wise from which i summarize code wise and month wise purchase vs consumption. these are done but i need a difference between every day purchase of that codes vs consumption. how do i do this? i tried my best but i cant. that's why i came to ask from experts if anyone can help me to pull out from this problem.

    i have a data sheet on which i insert pivot table slicer and timeline but i also need a difference column which i don't know how?
    also please if someone can tell me can i design a timeline with columns not cursor moving?

    if something not understand i will share more detailed.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-09-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    MS 365
    Posts
    124

    Re: Need a formula to add diference column

    if anything not understand i can explain more,
    i need code wise monthly difference between purchase and consumption, which code how much purchase in the month JAN and how much consume in the month JAN. i am not clear if this is possible to add the difference column in this table or how to add the difference? i want the difference on total in pivot not date wise.
    and the 2nd thing i want the timeline design to change is it possible that Timeline design also show in columns? not on scroll to side?

    Thanks

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,522

    Re: Need a formula to add diference column

    As to finding a difference, I believe that the following, placed in H4:H200 of Sheet4, may work: =IF(OR(A4="",A4="Grand Total"),"",C4*D4-E4*F4)
    If that doesn't produce the expected results then it would be helpful if you could manually include a few of the results so that we can see what the formulas/code should yield.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Forum Contributor
    Join Date
    01-09-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    MS 365
    Posts
    124

    Re: Need a formula to add diference column

    That's great Thanks JeteMc for your help. I need the Quantity Difference in one column (Purchase - Consumption) and the Amount in another column. if you can help me in this regard's

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,522

    Re: Need a formula to add diference column

    The amount difference is as given in post #3.
    The quantity difference is: =IF(OR(A4="",A4="Grand Total"),"",C4-E4)
    Let us know if you have any questions.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    01-09-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    MS 365
    Posts
    124

    Re: Need a formula to add diference column

    Quote Originally Posted by JeteMc View Post
    The amount difference is as given in post #3.
    The quantity difference is: =IF(OR(A4="",A4="Grand Total"),"",C4-E4)
    Let us know if you have any questions.
    Really appreciated Thanks its work fine, last thing which is missing, how do we add subtotal for the differences column we add manual. when we select months from time line, is it possible that the difference columns show totals?

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,522

    Re: Need a formula to add diference column

    Please show us an example of where a subtotal has been manually added to the difference column as described in post #6.
    Let us know if you have any questions.

  8. #8
    Forum Contributor
    Join Date
    01-09-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    MS 365
    Posts
    124

    Re: Need a formula to add diference column

    here i have attached the file, on the place of yellow highlighted.
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,522

    Re: Need a formula to add diference column

    Paste the following into cell G4 then double click the fill handle to copy down: =IF(A4="","",IF(A4="Grand Total",SUM(G$3:INDIRECT(ADDRESS(ROW()-1,COLUMN(G1)))),C4-E4))
    Paste the following into cell H4 then double click the fill handle to copy down: =IF(A4="","",IF(A4="Grand Total",SUM(H$3:INDIRECT(ADDRESS(ROW()-1,COLUMN(H1)))),C4*D4-E4*F4))
    Let us know if you have any questions.

  10. #10
    Forum Contributor
    Join Date
    01-09-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    MS 365
    Posts
    124

    Re: Need a formula to add diference column

    Quote Originally Posted by JeteMc View Post
    Paste the following into cell G4 then double click the fill handle to copy down: =IF(A4="","",IF(A4="Grand Total",SUM(G$3:INDIRECT(ADDRESS(ROW()-1,COLUMN(G1)))),C4-E4))
    Paste the following into cell H4 then double click the fill handle to copy down: =IF(A4="","",IF(A4="Grand Total",SUM(H$3:INDIRECT(ADDRESS(ROW()-1,COLUMN(H1)))),C4*D4-E4*F4))
    Let us know if you have any questions.
    Really appreciated, Thank you so much. Solved.

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,522

    Re: Need a formula to add diference column

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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 to calculate de biggest diference of a single value between cells in the sa
    By Flavius24 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-03-2019, 08:11 AM
  2. Compare two sheets and copy diference
    By werko in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2015, 11:07 AM
  3. Compare two sheets and copy diference
    By werko in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-24-2015, 04:27 AM
  4. Help with Formula to give the diference of days between 2 dates
    By Vicious00013 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-04-2014, 03:42 PM
  5. Excel 2007 : Calculating diference between two times
    By Niko1962 in forum Excel General
    Replies: 4
    Last Post: 05-27-2011, 09:27 AM
  6. diference from function
    By excellnewb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2008, 06:30 PM
  7. Accentuate diference between two values
    By mihai in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-18-2005, 11:26 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