Spreadsheet question

Discussion in 'Questions and Answers' started by Fin D, Jul 1, 2012.

  1. Fin D

    Fin D Sigh

    72,252
    43,684
    113
    Nov 27, 2007
    In Excel, I want to make a ledger that I can track animal weights. So, I'll have the rows be the date we weigh them and the columns be the animals and their weights. Easy enough and I can do that. What I'd like to have is a column near each animal that shows +/- weight differences between the current weight and previous weight. That I can also do, I just don't know how to do it for an entire column so it just automatically does it.

    [table="width: 500, class: grid"]
    [tr]
    [td]Date[/td]
    [td]Name[/td]
    [td]+/-[/td]
    [/tr]
    [tr]
    [td]1/1/12[/td]
    [td]500[/td]
    [td][/td]
    [/tr]
    [tr]
    [td]1/8/12[/td]
    [td]550[/td]
    [td][/td]
    [/tr]
    [tr]
    [td]1/15/12[/td]
    [td]525[/td]
    [td][/td]
    [/tr]
    [/table]

    So yeah, I just want the "+/-" column to automatically do the math instead of doing a new equation in every cell.
     
  2. dolfan32323

    dolfan32323 ty xphinfanx

    12,587
    1,574
    113
    Nov 27, 2007
    Washington DC
    I *think* this is how you do it. You have to set up an equation in the cell, and you do this by typing in the box an equal sign. So for instance, if you wanted to do the +/- in column D and the weight info was in column C, you would just use the corresponding data for Column C. An example would be if your info were in Column C, rows 2 and 3, you could set up an equation in the D cell you want by typing in =C3-C2 and you would be done. You can then drag this down throughout column D and it would adjust for the date in each corresponding column (meaning that the next cell in D would contain the equation for =C4-C3, then =C5-C4, etc.) If you need to hold a specific value so it doesn't change, you need to use a $ sign. So if you wanted to hold the info for C2, for example, in your equation you would type $C$2, so it would look like =C3-$C$2, =C4-$C$2, etc.

    Hope this helps, but a quick disclaimer, I know this is kinda confusing and I may even be a bit off... I haven't had to use excel in quite some time. If it doesn't work/is totally unrelated let us know :lol:
     
    Fin D likes this.
  3. Stitches

    Stitches ThePhin's Biggest Killjoy Luxury Box

    54,033
    33,761
    113
    Nov 23, 2007
    Spring, TX
    ^ This is the easiest way I know to do it as well.
     
  4. MikeHoncho

    MikeHoncho -=| Censored |=-

    52,658
    25,575
    113
    Nov 13, 2009
    Hit the easy button, stoopid
     
    Conuficus likes this.
  5. Fin D

    Fin D Sigh

    72,252
    43,684
    113
    Nov 27, 2007
    Thanks. I knew how to do basic equations, I just thought there might be a way to set an equation to a column so I didn't have to copy paste the equation. Buuuuut, I did what you said and just copy and paste like you said and all good. Thank you.
     
    dolfan32323 likes this.
  6. jdang307

    jdang307 Season Ticket Holder Club Member

    39,159
    21,798
    113
    Nov 29, 2007
    San Diego
    The way to set the equation to a column is to just put it one of the cells, copy it, then click the column button at the top, then past it to the whole column. Now, the first two cells may return an error (first one because there is no cell before C1, the second one because there is no value in C1 to return a value in C2).

    This is assuming your cells above start at A1.

    If you want to hide the formula when there are no values, then you want the following code.

    =IF(B3-B2=0,"",B3-B2)

    Then as you fill in the weights, it'll automatically return a formula, but if the value is 0, it'll be hidden.
     
    Fin D likes this.
  7. Fin Fan In Cali

    Fin Fan In Cali Dolphin fan since 1970 Luxury Box

    28,030
    13,840
    113
    Nov 22, 2007
    So. Cal
    Bro if you are going to use the same formula in another column you can put your mouse in the bottom right corner see the + sign and drag the formula to the next column and there you have it.
     

Share This Page