+ Reply to Thread
Results 1 to 12 of 12

Formula to find difference with changing initial number?

  1. #1
    Registered User
    Join Date
    08-22-2014
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    6

    Formula to find difference with changing initial number?

    Hi, I am struggling to find a formula that would work. I have a row of data and the first cell is fixed. I put in a number in the cell next to it and need to subtract the fixed data.. That bit is easy. However, I then add a new number and need the formula to use this instead to subtract the fixed number from.
    For example A1 would be 6.3. B1 would be 7.2 and produce an answer in cell F1. Then new data is out into C1 so now the formula needs to use C1-A1 and so on. Does this make any sense and is it possible? Thanks
    Last edited by klm1312; 08-22-2014 at 06:29 PM.

  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,926

    Re: Is this possible?

    Hi, welcome to the forum

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    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-22-2014
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to find difference with changing initial number?

    Thank you. I have done this. Fingers crossed someone can help.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Formula to find difference with changing initial number?

    If I understand, it almost sounds like you need to understand how to make a cell reference absolute: http://office.microsoft.com/en-us/ex...es_in_formulas

    Perhaps in your case =B1-$A$1 The reference to B1 will change as the formula is copied, but the reference to A1 will stay fixed.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    08-22-2014
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to find difference with changing initial number?

    Hmmm that works but then when I add a new figure in the next cell it needs to use that instead and subtract the fixed cell. Every month a new figure will be put in the next cell and this needs to be the one. Any sense? Thanks

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Formula to find difference with changing initial number?

    I must not understand.

    You need a cell formula that will subtract two cells. It needs to be able to recognize when you enter a value in a cell adjacent to the currently used cells and automatically adjust its reference to the newly entered cell? In accomplishing this, you do not want to simply copy the formula over to match the entered cell?

    Can you upload a sample spreadsheet? Can you explain in better detail what you need this to do?

  7. #7
    Registered User
    Join Date
    08-20-2014
    Location
    Kelowna, Canada
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula to find difference with changing initial number?

    If I am understanding this correctly you have a range of monthly data and a cell at the end that does a formula based on the most current data in the range. So F1 would equal B1-A1, and then when data is put into C1 it needs to be C1-A1, and then when data is entered into D1 it should be D1-A1. If so then try this =INDEX(A1:E1,MATCH(9.99999999999999E+307,A1:E1))-$A$1. Cells should be blank until you want a value in them.

  8. #8
    Registered User
    Join Date
    08-22-2014
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to find difference with changing initial number?

    image.jpg

    This is what it looks like. When I add Nov figure this needs to be used minus Sept and so on

  9. #9
    Registered User
    Join Date
    08-20-2014
    Location
    Kelowna, Canada
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula to find difference with changing initial number?

    Try the formula I posted. I use that Index & Match combo when I want to return the most current monthly data on dashboards, just set the ranges to whatever your range is..in the case of that photo change A1:E1 in the formula I posted to B4:H4 and $A$1 to $B$4 and put it in cell I4

  10. #10
    Registered User
    Join Date
    08-22-2014
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to find difference with changing initial number?

    Thank you. It pops up saying I've entered too few arguments and highlights 307. Any ideas? Ta

  11. #11
    Registered User
    Join Date
    08-22-2014
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to find difference with changing initial number?

    Hmmm. Miss , out! Thank you. Works wonderfully!

    If I want to now copy this into the rows below would I have to type it all in again or can it be copied in some way?

    Many thanks again!

  12. #12
    Registered User
    Join Date
    08-20-2014
    Location
    Kelowna, Canada
    MS-Off Ver
    2010
    Posts
    10

    Re: Formula to find difference with changing initial number?

    If you drag it down to the cells you want it should copy and change the cells to their new relative cells. You will need to manually change the absolute cell to the new one it would be, or it would still be trying to use $B$4

    No Problem

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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