Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How can I auto number rows only when data is entered in the same r

I'm working with Microsoft Office 2003. Is there anyway I can auto number
rows (in sequence) in column A ONLY when data is entered in column B? 9 cool
points for the first correct answer. THANKS! (0:
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default How can I auto number rows only when data is entered in the same r

Using a formula:

=IF(B2="","",A1+1)
copied down as far as you would ever need to go.

Using VB:
Right click on sheet tab, view code, paste this in:

'=======
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B:B")) Is Nothing Then Exit Sub
Target.Offset(0, -1).Value = Target.Offset(-1, -1).Value + 1
End Sub
'=======
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Plateav" wrote:

I'm working with Microsoft Office 2003. Is there anyway I can auto number
rows (in sequence) in column A ONLY when data is entered in column B? 9 cool
points for the first correct answer. THANKS! (0:

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How can I auto number rows only when data is entered in the same r

You could use a formula in column A that makes it look like an empty row until
something appears in column B. But you'll have to copy it down the column as
far as you need:

=if(b1="","",row())

(This assumes that no rows in column B are skipped.)

Plateav wrote:

I'm working with Microsoft Office 2003. Is there anyway I can auto number
rows (in sequence) in column A ONLY when data is entered in column B? 9 cool
points for the first correct answer. THANKS! (0:


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How can I auto number rows only when data is entered in the sa

Luke! Poets will write songs about you one day! PERFECTO!!!

"Luke M" wrote:

Using a formula:

=IF(B2="","",A1+1)
copied down as far as you would ever need to go.

Using VB:
Right click on sheet tab, view code, paste this in:

'=======
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B:B")) Is Nothing Then Exit Sub
Target.Offset(0, -1).Value = Target.Offset(-1, -1).Value + 1
End Sub
'=======
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Plateav" wrote:

I'm working with Microsoft Office 2003. Is there anyway I can auto number
rows (in sequence) in column A ONLY when data is entered in column B? 9 cool
points for the first correct answer. THANKS! (0:

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
auto fill entered data from one worksheet to another Jane Griffel[_2_] Excel Discussion (Misc queries) 2 September 9th 09 09:44 PM
Add rows when data is entered desperate in MS Excel Discussion (Misc queries) 0 February 9th 09 05:51 PM
Auto Number the Rows of Auto Filter Result ashish128 Excel Discussion (Misc queries) 3 April 29th 07 06:41 PM
Auto calculate formulas when new data is entered Cam1234 Excel Discussion (Misc queries) 6 February 15th 07 05:30 PM
Auto date/time insert when data entered into an adjacent cell Auto date/time Excel Worksheet Functions 1 July 9th 05 12:10 AM


All times are GMT +1. The time now is 05:49 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"