Solved

MS excel

Posted on 2011-02-20
12
224 Views
Last Modified: 2012-05-11
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
Comment
Question by:JeffBeall
12 Comments
 
LVL 41

Expert Comment

by:dlmille
Comment Utility
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
 
LVL 41

Expert Comment

by:dlmille
Comment Utility
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
 
LVL 3

Accepted Solution

by:
Mantvydas earned 167 total points
Comment Utility
I would do otherwise.

I would keep sentence numbers in column A, and sentences in column B.
0
 
LVL 41

Expert Comment

by:dlmille
Comment Utility
So, what are you saying.  Do what otherwise?
0
 
LVL 41

Expert Comment

by:dlmille
Comment Utility
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
 
LVL 41

Assisted Solution

by:dlmille
dlmille earned 166 total points
Comment Utility
ok - let me try again... here's the revised macro for sentence numbers in column A...

Dave
NumberSentenceAuto-r2.xlsm
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 45

Assisted Solution

by:patrickab
patrickab earned 167 total points
Comment Utility
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
 
LVL 45

Expert Comment

by:patrickab
Comment Utility
ps. Note: 1900 wasn't a Leap Year
0
 
LVL 45

Expert Comment

by:patrickab
Comment Utility
Oops - Apologies - please ignore that comment it's in the wrong thread.
0
 
LVL 1

Author Closing Comment

by:JeffBeall
Comment Utility
thanks for the help.
0
 
LVL 45

Expert Comment

by:patrickab
Comment Utility
JeffBeall - Thanks for the points - Patrick
0
 
LVL 41

Expert Comment

by:dlmille
Comment Utility
I'm not sure I understand the point distribution, but what the hey...

Dave
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now