I can enter a few different numbers in one cell lined up vertically within the same cell by using
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Calculation (Office 2000 SR-1)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Calculation (Office 2000 SR-1)
- This topic has 14 replies, 5 voices, and was last updated 22 years, 10 months ago.
Viewing 3 reply threadsAuthorReplies-
WSpieterse
AskWoody Lounger -
WShlewton
AskWoody Plus
-
-
WSHansV
AskWoody LoungerJune 6, 2002 at 12:32 pm #592634IMHO, what you’re doing is going against the grain of Excel. Different values belong in different cells. that makes formatting and calculations much easier.
Putting line feeds in a cell make it into text, so that numeric formatting will be ignored.
If you still want to do it as you designed, put the following function in a module:
Function CellSum(aCell As Range) As Double
Dim strVal As String
Dim intStart As Integer
Dim intEnd As Integer
strVal = aCell.Value
‘ Get out if cell is empty
If strVal = “” Then
Exit Function
End If
intStart = 1
‘ Look for line feed
intEnd = InStr(intStart, strVal, Chr$(10))
Do While intEnd > 0
‘ Add numeric value
CellSum = CellSum + Val(Mid(strVal, intStart, intEnd – intStart))
intStart = intEnd + 1
intEnd = InStr(intStart, strVal, Chr$(10))
Loop
‘ Add final (or only) part
CellSum = CellSum + Val(Mid(strVal, intStart))
End FunctionThen, you can use a formula like
=A2*B2-CellSum(C2)
-
WSAndrew Cronnolly
AskWoody Lounger -
WShlewton
AskWoody Plus -
WSHansV
AskWoody LoungerJune 6, 2002 at 2:16 pm #592702Hi hlewton,
My code was actually just a lark, to show that it could be done. However much you may like it, you still have the problem that a cell with line feeds is always considered to be text. You can’t format the individual numbers in it. So I think Andrew’s solution is to be preferred.
Regards,
Hans -
WShlewton
AskWoody Plus -
WSpieterse
AskWoody LoungerJune 7, 2002 at 5:59 am #593076You should be aware however, that merged cells may raise all sorts of trouble in Excel, regarding copying, sorting, etcetera. Also, I was told some array formula’s will not work with merged cells (although you will probably never use them).
It might be simpler to make the sheet’s grid invisible (Tools, OPtions, View, Gridlines) and create a new “grid” using borders in the places you want them.
-
WShlewton
AskWoody Plus -
WSpieterse
AskWoody LoungerJune 10, 2002 at 5:00 am #593538As you noticed, sorting will give trouble with merged cells. It will cause you a lot of headaches trying to set things up with merged cells to be able to sort. Simplest is to NOT merge.
Another problem with your setup -if you want it sorted- is that for a proper sort you will need to have the name repeated accross each row. Otherwise the empty rows will end up at the bottom or the top of your sorted list, disconnected from the persons they belonged to!
-
WShlewton
AskWoody Plus
-
-
-
-
-
WSAladin Akyurek
AskWoody LoungerJune 7, 2002 at 12:17 pm #593136In F2 enter:
=A2*B2-SUM(EVAL(“{“&SUBSTITUTE(C2,CHAR(10),”,”)&”}”))
In order to use EVAL you need to download the Longre’s Morefunc add-in from:
http://longre.free.fr/english/index.html
Aladin
Viewing 3 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
He knew more than he posted on here (Awaiting moderation)
by
Biiljoy
1 hour ago -
Formula to Calculate Q1, Q2, Q3, or Q4 of the Year?
by
WSJon5
1 hour, 40 minutes ago -
Clock missing above calendar in Windows 10 (Awaiting moderation)
by
WSCape Sand
2 hours, 38 minutes ago -
The time has come for AI-generated art
by
Catherine Barrett
8 hours, 7 minutes ago -
Hackers are using two-factor authentication to infect you
by
B. Livingston
2 hours, 9 minutes ago -
23 and you
by
Max Stul Oppenheimer
8 hours, 10 minutes ago -
April’s deluge of patches
by
Susan Bradley
8 hours, 10 minutes ago -
April’s deluge of patches
by
Susan Bradley
3 minutes ago -
Windows 11 Windows Updater question
by
Tex265
23 minutes ago -
Key, Key, my kingdom for a Key!
by
RetiredGeek
23 hours, 16 minutes ago -
Registry Patches for Windows 10
by
Drcard:))
1 day, 3 hours ago -
Cannot get line length to NOT wrap in Outlining in Word 365
by
CWBillow
10 hours, 21 minutes ago -
DDU (Display Driver Uninstaller) updates
by
Alex5723
21 hours, 9 minutes ago -
Align objects on a OneNote page
by
CWBillow
1 day, 9 hours ago -
OneNote Send To button?
by
CWBillow
1 day, 9 hours ago -
WU help needed with “Some settings are managed by your organization”
by
Peobody
1 day, 18 hours ago -
No Newsletters since 27 January
by
rog7
1 day, 14 hours ago -
Linux Mint Debian Edition 7 gets OEM support, death of Ubuntu-based Mint ?
by
Alex5723
19 hours, 4 minutes ago -
Windows Update “Areca Technology Corporation – System – 6.20.0.41”
by
Bruce
17 hours, 44 minutes ago -
Google One Storage Questions
by
LHiggins
1 hour, 43 minutes ago -
Button Missing for Automatic Apps Updates
by
pmcjr6142
8 hours, 58 minutes ago -
Ancient SSD thinks it’s new
by
WSila
23 hours, 40 minutes ago -
Washington State lab testing provider exposed health data of 1.6 million people
by
Nibbled To Death By Ducks
2 days, 9 hours ago -
WinRE KB5057589 fake out
by
Susan Bradley
1 hour, 57 minutes ago -
The April 2025 Windows RE update might show as unsuccessful in Windows Update
by
Susan Bradley
1 day, 17 hours ago -
Firefox 137
by
Charlie
20 hours, 4 minutes ago -
Whisky, a popular Wine frontend for Mac gamers, is no more
by
Alex5723
2 days, 21 hours ago -
Windows 11 Insider Preview build 26120.3863 (24H2) released to BETA
by
joep517
2 days, 21 hours ago -
Windows 11 Insider Preview build 26200.5551 released to DEV
by
joep517
2 days, 21 hours ago -
New Windows 11 PC setup — can I start over in the middle to set up a local id?
by
ctRanger
1 day, 17 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.