Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
auto fill entered data from one worksheet to another | Excel Discussion (Misc queries) | |||
Add rows when data is entered | Excel Discussion (Misc queries) | |||
Auto Number the Rows of Auto Filter Result | Excel Discussion (Misc queries) | |||
Auto calculate formulas when new data is entered | Excel Discussion (Misc queries) | |||
Auto date/time insert when data entered into an adjacent cell | Excel Worksheet Functions |