We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Excel Formula Query

Cotta
Cotta Posts: 3,667 Forumite
I've just taken over an old spreadsheet that somebody else setup, the following code is on it - can anyone explain what it means please?


=(L11-M11)+ROW()/1000000


Thanks

Comments

  • spadoosh
    spadoosh Posts: 8,732 Forumite
    Ninth Anniversary 1,000 Posts Name Dropper Photogenic
    cell minus cell, add the sum of the row in which the formula is in, divided by one million.

    ROW() means add the total value of what is in the row in which the forumla is in. If there is a number in the brackets it relates to a specific row.
  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    The ROW() bit of the formula give the row number the formula is in. I guess it's being divided by 1000000 to give a tiny number to try and stop duplicate values in the list (useful if you're trying to rank numbers or similar).
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
  • Cotta
    Cotta Posts: 3,667 Forumite
    Thanks all, one final point.

    L11 = 10
    M11 = 5

    Formula returns 5.000023, should it not be 5.000005 as 5+5/1000000 = 5.000005
  • wealdroam
    wealdroam Posts: 19,180 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Combo Breaker
    edited 15 March 2016 at 3:02PM
    Cotta wrote: »
    Thanks all, one final point.

    L11 = 10
    M11 = 5

    Formula returns 5.000023, should it not be 5.000005 as 5+5/1000000 = 5.000005

    If there is nothing else in row 11, I think it should return 5.000015
    i.e. (10 - 5) + (10 + 5)/1000000
  • Le_Kirk
    Le_Kirk Posts: 25,352 Forumite
    Part of the Furniture 10,000 Posts Photogenic Name Dropper
    Which cell contains your formula? Is it in row 23 or row 5?
    L11 - M11 = 5
    Row() = 11 (if your formula is in row 11 like mine was)
    11/1000000 = 0.000011
    Total = 5.000011


    The reference ROW() adds the number of the row NOT the value of anything in that row.
  • Cotta
    Cotta Posts: 3,667 Forumite
    Le_Kirk wrote: »
    Which cell contains your formula? Is it in row 23 or row 5?
    L11 - M11 = 5
    Row() = 11 (if your formula is in row 11 like mine was)
    11/1000000 = 0.000011
    Total = 5.000011


    The reference ROW() adds the number of the row NOT the value of anything in that row.

    Perfect, I didn't realise it was using the row number.

    Thanks everyone for your help.
  • spadoosh
    spadoosh Posts: 8,732 Forumite
    Ninth Anniversary 1,000 Posts Name Dropper Photogenic
    Sorry that wouldve been my mistake! Thought it was the sum of the row... oops.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.4K Banking & Borrowing
  • 253.7K Reduce Debt & Boost Income
  • 454.4K Spending & Discounts
  • 245.4K Work, Benefits & Business
  • 601.3K Mortgages, Homes & Bills
  • 177.6K Life & Family
  • 259.3K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.