[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

MS excel

is there a way to create a numbered list in a cell?  so if i'm at cell a1 and i start typing, come to the end of my sentence and hit enter, my first sentence would be numbered 1 and when i hit enter the next sentence would be 2
0
JeffBeall
Asked:
JeffBeall
3 Solutions
 
dlmilleCommented:
Yes. An easy way is to type in column a - and put a formula in column b, starting at B1

[B1]=row() & ": " & A1

and copy that formula down.

I can give you more sophisticated stuff, but let me know if this works ok for you.

Dave
0
 
dlmilleCommented:
See attached with a macro.  Be sure to clear if you edit a line above.

The code puts the row number followed by a ":" in front of what was typed.

See below and attached...

it checks for any changes in the first column...

NumberSentenceAuto-r1.xlsm

Dave
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Cells(1, 1).EntireColumn) Is Nothing Then
        Application.EnableEvents = False
        Target.Value = Target.Row & " : " & Target.Value
        Application.EnableEvents = True
    End If
    
End Sub

Open in new window

0
 
MantvydasCommented:
I would do otherwise.

I would keep sentence numbers in column A, and sentences in column B.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
dlmilleCommented:
So, what are you saying.  Do what otherwise?
0
 
dlmilleCommented:
Ah - type in column B and have column a formula?  Then set

[A1] = row() & ": " & B1

or try out the macro I posted.

Enjoy!

Dave

0
 
dlmilleCommented:
ok - let me try again... here's the revised macro for sentence numbers in column A...

Dave
NumberSentenceAuto-r2.xlsm
0
 
patrickabCommented:
JeffBeall,

If you want to keep the list all in one cell then at the end of every line and when you want a new line within that cell use ALT+ENTER. That will insert a new line within the cell. When you have finished editing that cell just press ENTER.

Patrick
0
 
patrickabCommented:
ps. Note: 1900 wasn't a Leap Year
0
 
patrickabCommented:
Oops - Apologies - please ignore that comment it's in the wrong thread.
0
 
JeffBeallAuthor Commented:
thanks for the help.
0
 
patrickabCommented:
JeffBeall - Thanks for the points - Patrick
0
 
dlmilleCommented:
I'm not sure I understand the point distribution, but what the hey...

Dave
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now