+ Reply to Thread
Results 1 to 6 of 6

rownumber as a value in a cel

  1. #1
    Registered User
    Join Date
    11-23-2006
    Posts
    3

    rownumber as a value in a cel

    hi there,

    I'm an absolute noob to excel so these, and I hope they are, might be 2 easy questions:

    1) in a row, I need the value of the rownumber in a cel: e.g. if the rownumber is 1, column M in that rownumber should contain 1. However, if I insert a row above it, the value of column M should automatically become number 2 (because it changed from 1 to 2 by inserting a row above. In the new row number 1, column M automatically should get the value 1 being it's current rownumber).

    2) to be complete, I should be able to start with a line that does not count in calculating the rownumber. So if the solution for column M for the problem above should be like =rownumber then it should become =rownumber-1

    I hope I'm a bit clear, I'll post an example of the file hoping to make it clear anyway: you'll see that in each of the rows, exept the first one, the number 1 and 2 always comes back.

    &rc=39&minS=2006-09-01&maxE=2007-09-01&

    &id1=1&sd1=2006-09-27&ed1=2006-09-27&t1= L.S.&d1=content row 1</b>&al1=0&et1=once&p1=&

    &id2=2&sd2=2006-10-02&ed2=2006-10-02&t2=K.S. L.S.&d2=<P>content row 2

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    In any row, just type
    Please Login or Register  to view this content.
    HTH
    Carim

  3. #3
    Registered User
    Join Date
    11-23-2006
    Posts
    3

    row()

    yes, ok: but since I need to have a blank line on top that doesn't count, shouldn't it be something like row()-1 then? Yes it is, I could try that myself and it is working, thanks.

    But now I put that in each cel in that column, isn't there a way to say to column M that, even after inserting a blank row, that column M always contains row()-1 ?

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    With what you are saying ...yes you should use
    =row()-1

    bear in mind that inserting or deleting a row will not affect the formula
    it will always be row()-1 and the result will always be correct ...

    HTH
    Carim

  5. #5
    Registered User
    Join Date
    11-23-2006
    Posts
    3
    well, when I insert a new row, unfortunatly the new row does not contain any formula's what soever, maybe I did something wrong while inserting the row, or maybe with assigning the formula to cells instead of an entire column. I dont even know how to assign a formula to a whole column. I looked for it, but couldn't find it.

    thanks to you I already got rid OF A LOT OF manually typing things so really thanks !!

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Ok then ...

    a last tip to enter the same formula into a range

    1.Highlight your range
    2.Press Control, while clicking on the first cell of your range
    3.Type your formula in the first cell
    4. Press Control, while pressing Enter ...

    HTH
    Carim

+ 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