tags:

views:

287

answers:

1

I want to Auto generate serial number.

Student Name Serial number Address Group Section Student ID

Monir 07001 Dhaka,Bangladesh Science B SC001B

When I enter a Student name it will automatically generate its Serial number in the place of Serial number .After that if i save it again enter any new student it will generate the next serial number automatically.

How do i can do it. Please help me.

+1  A: 

If I understood your question correctly the excel-solution is rather easy.

Add the serial number for the first student by hand (07001) and fill the remaining serial number fields (the ones below) with the following formula:

Formula: =IF(ISBLANK(A2),"",B1+1) With A2 = cell to the left and B1 = cell above

R1C1 Notation: =IF(ISBLANK(RC[-1]),"",R[-1]C+1)

Edit: To "add" a leading 0 to the number, you need to set the number format of your serial number to the following custom format: 000000

marg
This will not generate "07002", but "7002".
Svein Bringsli
OK, but it's a minor change to make the formula =IF(ISBLANK(RC[-1]),"",Text(R[-1]C+1, "000000"))
DaveParillo
Daves formula works and I added another approach to "add" a leading zero.
marg