Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default increment number by code


Hi experts,
I think the following question would be very easy one.
Now i am using a very simple formula =b1+1 for incrementing the serial
number. But the problem comes when somebody try to delete the row the
formula affected. So is it possible to write a code for that ? if so
where do i place it , in worksheet module ?
thanks
by
nowfal


--
nowfal
------------------------------------------------------------------------
nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
View this thread: http://www.excelforum.com/showthread...hreadid=388110

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default increment number by code


In Cell B2
=OFFSET(A2,-1,0)+1

This should work because the cell only references itself



"nowfal" wrote:


Hi experts,
I think the following question would be very easy one.
Now i am using a very simple formula =b1+1 for incrementing the serial
number. But the problem comes when somebody try to delete the row the
formula affected. So is it possible to write a code for that ? if so
where do i place it , in worksheet module ?
thanks
by
nowfal


--
nowfal
------------------------------------------------------------------------
nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
View this thread: http://www.excelforum.com/showthread...hreadid=388110


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default increment number by code

Sorry, I had a typo in the first post

In Cell B2
=OFFSET(b2,-1,0)+1

This should work because the cell only references itself


"nowfal" wrote:


Hi experts,
I think the following question would be very easy one.
Now i am using a very simple formula =b1+1 for incrementing the serial
number. But the problem comes when somebody try to delete the row the
formula affected. So is it possible to write a code for that ? if so
where do i place it , in worksheet module ?
thanks
by
nowfal


--
nowfal
------------------------------------------------------------------------
nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
View this thread: http://www.excelforum.com/showthread...hreadid=388110


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default increment number by code


Thanks a lot g bor, it works. But still a question is it possible to
have it programatically by a code.
regards
nowfal


--
nowfal
------------------------------------------------------------------------
nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
View this thread: http://www.excelforum.com/showthread...hreadid=388110

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Increment invoice number suzi_75 Excel Worksheet Functions 1 October 21st 09 12:12 PM
Auto Increment Number Thomas [PBD] Excel Discussion (Misc queries) 0 June 24th 08 10:01 PM
How to increment number using vb script Lillian Excel Programming 4 December 5th 04 02:00 AM
increment date code prodsched[_6_] Excel Programming 1 May 17th 04 08:29 PM
Increment number by 1 Joe Derr Excel Programming 5 May 16th 04 08:28 PM


All times are GMT +1. The time now is 03:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"