+ Reply to Thread
Results 1 to 10 of 10

Thread: subtracting two numbers

  1. #1
    Registered User
    Join Date
    03-21-2010
    Location
    durban, south africa
    MS-Off Ver
    Excel 2007
    Posts
    3

    subtracting two numbers

    ok its not as easy as it sounds, but what im trying to calculate is depending on a position of a song each week. Eg song : Kesha's Tik-Tok is currently at no. 8 and the next week its at 3. I want to calculate that for that song. but you see it will be in a different cell each
    Please can you help me with a formula if its possible?

    *it's not just 1 song i want to calculate its 40 different tracks each week. Here's a piece of the full chart

    Current Position. Last week
    1 (find diff btwn this no and that one) 4 Iyaz Replay
    2 9 Pitbull ft Akon Shut it down
    3 6 One Republic All the right moves
    --------------
    Last edited by jippee; 03-21-2010 at 01:08 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,219

    Re: subtracting 2 numbers...

    Can you upload example?
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,806

    Re: subtracting 2 numbers...

    assuming this week iw in col a a2 downwards and last week is col b b2 down
    then something along the lines of

    =IF(B2-A2>0,"up "&B2-A2,IF(B2-A2<0,"down "&ABS(B2-A2),IF(B2=A2,"no change")))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,219

    Re: subtracting 2 numbers...

    or this

    =CHOOSE(SIGN(A1-B1)+2;"up";"same";"down")
    "Relax. What is mind? No matter. What is matter? Never mind!"

  5. #5
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,806

    Re: subtracting 2 numbers...

    clever that, i've never really used sign and completely forgot it, nice one.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Registered User
    Join Date
    03-21-2010
    Location
    durban, south africa
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: subtracting 2 numbers...

    hey thanks for the info, listen each chart will either be on a separate sheet or on a new workbook, depending if its a new month.

    Can you upload example?
    Yeah but where do i upload it?

    CHART 1/week 1
    Current Position. Last week
    *cell A1, sheet 1* 1 4 Iyaz - Replay

    CHART 2/week 2
    Current Position. Last week
    *cell A7, Sheet 2* 7 1 Iyaz - Replay

    i want to calculate the difference between week 1 position and week 2 position.
    ****those are estimates cell positions, each week the song position is going to be different, so i want a formula that can pick out the song name and use its own values, so the next week (week 3) might be in cell A13.

    thanks
    Last edited by jippee; 03-22-2010 at 05:45 AM.

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,219

    Re: subtracting 2 numbers...

    You can click New post and then click stample icon.

    Did you try to implement solutions above?

    (maybe you need to change ; to , in my example)

    =CHOOSE(SIGN(A1-B1)+2,"up","same","down")
    "Relax. What is mind? No matter. What is matter? Never mind!"

  8. #8
    Registered User
    Join Date
    03-21-2010
    Location
    durban, south africa
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: subtracting 2 numbers...

    i have shown my example in my previous post^
    thanks

    =IF(B2-A2>0,"up "&B2-A2,IF(B2-A2<0,"down "&ABS(B2-A2),IF(B2=A2,"no change")))
    =CHOOSE(SIGN(A1-B1)+2;"up";"same";"down")
    thanks, like these ones to show the change, but will also like to show the amount in change, like moved up '+13' places or down '-5' places.

    thank u!
    Last edited by jippee; 03-22-2010 at 05:58 AM.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,219

    Re: subtracting 2 numbers...

    It's showed example and we would rather see uploaded example
    "Relax. What is mind? No matter. What is matter? Never mind!"

  10. #10
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,806

    Re: subtracting 2 numbers...

    =IF(B2-A2>0,"up "&B2-A2,IF(B2-A2<0,"down "&ABS(B2-A2),IF(B2=A2,"no change")))
    does that it gives back "up 13" or "down 4" or "no change"
    if you want the +/- sign in there then

    =IF(B2-A2>0,"up +"&B2-A2,IF(B2-A2<0,"down "&B2-A2,IF(B2=A2,"no change <>")))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0