1

I need to ad the next sequence number in Column A automatically when I fill enter the next value in Column B. This sounds confused. Just see the snap so you will get the clear pictureenter image description here.

This should be done without usual dragging option. Is there any way

0

4 Answers 4

2

Make the Value of A1 equal to 1 and then from the A2 use the formula:

=IF(B3<>"",A2+1," ")

Drag this formula for the whole column.

In my solution I have a drag, but it is to define the formula for each of the fields. (I'm not sure if is this you are trying to avoid when you say

without the usual dragging option

)

Sign up to request clarification or add additional context in comments.

1 Comment

This is what i noted. After read your answer I realize how simple it is. But didn't thought it by myself. Thanks
0

You may achieve this using macros. Formula will increase the file size and processing time.

Right click on the sheet name on sheet tab-->select view code-->paste below code--> save file as macro enabled workbook.

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo step
If Target.Column = 2 And Target.Value <> "" Then
Target.Offset(0, -1) = Target.Row - 1
End If

Exit Sub

step:
Exit Sub

End Sub

Comments

0

You can also do this without using macro and formula:

  1. Type first 2 value to the cell to establish the pattern
  2. highlight the cell range
  3. Under Home tag -> select Fill -> choose Series
  4. Follow the image and Select OK

enter image description here

Comments

0

If you convert your table to a List ("Table") and use a formula for the first column, that formula will "auto-extend" as new values are typed in under "Item"

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.