Closed Thread
Results 1 to 11 of 11

Making one cell subtract from another cell and insert result in a 3rd cell.

  1. #1
    Registered User
    Join Date
    01-20-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    87

    Making one cell subtract from another cell and insert result in a 3rd cell.

    Unfortunately I have zero experience with Macros which may be required.

    I'm doing some personal financial work and am hoping I can get some help to automate for which I would be very grateful.

    1) The first thing I would like to do is:

    When there is a figure in Column P (beginning with P3), subtract that number from the figure in Column AB one Row earlier and insert the result in Column AB in the same row as the Column P figure.

    E.g., in this workbook the first time there is a figure in Column P is P5.
    Subtract the figure in P5 from AB4 and insert the result in AB5.

    The next figure in Column P is P7.
    Subtract the figure in P7 from the figure in AB6 and insert the result in AB7.
    Etc.

    It would be ideal if it would not do anything until there is a figure in Column AB. Eventually there will be but I'm proceeding Row by Row.
    I.e., the Column P figures are all already in that Column.
    The Column AB figures are not there. When I work on Row 3 I insert a figure into AB3, when working on Row 4 I insert a figure into AB4, etc.

    It would be less confusing if the subtraction did not activate until cued by the insertion of a figure into the AB Column (as opposed to inserting negative numbers in the AB Column at first).

    Would a Formula work for this or does it need a Macro?

    Thank you.
    Last edited by ununio; 03-12-2018 at 05:00 AM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Seeking help with Formulas (or possibly Macros).

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    01-20-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    87

    Re: Seeking help with Formulas (or possibly Macros).

    Quote Originally Posted by nflsales View Post
    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    NP, will do.

  4. #4
    Registered User
    Join Date
    01-20-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    87

    Re: Making one cell subtract from another cell and insert result in a 3rd cell.

    Rereading the Moderator message, I wanted to make sure this thread is not locked now that I've renamed it, and apparently it is not locked.

    I'd delete this, but can't find an option for that.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Making one cell subtract from another cell and insert result in a 3rd cell.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  6. #6
    Registered User
    Join Date
    01-20-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    87

    Re: Making one cell subtract from another cell and insert result in a 3rd cell.

    Thank you for your response.

    I'm attaching 2 worksheets - Before and After.

    The task is described beginning at A22 on both worksheets.
    Attached Files Attached Files

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

    Re: Making one cell subtract from another cell and insert result in a 3rd cell.

    Assuming that column O is also already populated before the values are added to column AB try pasting the following in AB4 and dragging the fill handle down to AB17:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Registered User
    Join Date
    01-20-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    87

    Re: Making one cell subtract from another cell and insert result in a 3rd cell.

    Thank you very much for responding and for your work.

    Do I clear all the existing figures in Column AB and replace the ones that I've cleared after I cut and past/drag fill handle?
    Last edited by AliGW; 03-17-2018 at 02:08 AM. Reason: Unnecessary quotation removed.

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

    Re: Making one cell subtract from another cell and insert result in a 3rd cell.

    You're Welcome and thank you for the feedback.
    Working from the 'After' workbook, you could either clear the figures and paste/drag starting with AB4 or leave what you already have and paste the following modification of the formula into AB18:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In the event that this resolves issues, please take a moment to mark the thread as 'Solved' using the thread tools drop down on the ribbon above your first post.
    I hope that you have a blessed day.

  10. #10
    Registered User
    Join Date
    01-20-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    87

    Re: Making one cell subtract from another cell and insert result in a 3rd cell.

    Quote Originally Posted by JeteMc View Post
    You're Welcome and thank you for the feedback.
    Working from the 'After' workbook, you could either clear the figures and paste/drag starting with AB4 or leave what you already have and paste the following modification of the formula into AB18:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In the event that this resolves issues, please take a moment to mark the thread as 'Solved' using the thread tools drop down on the ribbon above your first post.
    I hope that you have a blessed day.
    Thank you, will try that.

    I've now posted the entire project of which this is a part here:
    https://www.excelforum.com/excel-pro...-3rd-cell.html

    Post #9.

    (After posting here initially I thought that it wouldn't be possible without Macros and posted over there also].
    Last edited by ununio; 03-17-2018 at 06:01 PM.

  11. #11
    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,785

    Re: Making one cell subtract from another cell and insert result in a 3rd cell.

    Thread closed in favour of the one in the VBA section.
    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.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Seeking help on this VBA Macro as I am new to progaming MACROS
    By VBANEWSTUDENT2017 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-19-2017, 09:56 PM
  2. [SOLVED] Seeking formulas tor Billing Statement to calculate Past Due 30, 60, 90, 120 days
    By ElmerFud in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-30-2015, 02:47 PM
  3. Nesting Function & Possibly Macros Needed?
    By Falcon459 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-24-2015, 08:42 AM
  4. Replies: 3
    Last Post: 07-17-2013, 06:19 PM
  5. seeking a summary table using only formulas
    By James C in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-28-2013, 05:21 PM
  6. Copying formulas and possibly simplify
    By HurricaneDan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2007, 09:50 AM
  7. Need help with (possibly) macros?
    By marla in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2006, 02:38 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