I can enter a few different numbers in one cell lined up vertically within the same cell by using
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
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
-
Excel Macro — ask for filename to be saved
by
nhsj
2 hours ago -
Trying to backup Win 10 computer to iCloud
by
SheltieMom
19 hours, 25 minutes ago -
Windows 11 Insider Preview build 26200.5570 released to DEV
by
joep517
1 day, 9 hours ago -
Windows 11 Insider Preview build 26120.3941 (24H2) released to BETA
by
joep517
1 day, 10 hours ago -
Windows 11 Insider Preview Build 22635.5305 (23H2) released to BETA
by
joep517
1 day, 11 hours ago -
No April cumulative update for Win 11 23H2?
by
Peobody
1 hour, 22 minutes ago -
AugLoop.All (TEST Augmentation Loop MSIT)
by
LarryK
1 day, 11 hours ago -
Boot Sequence for Dell Optiplex 7070 Tower
by
Serge Carniol
2 days, 2 hours ago -
OTT Upgrade Windows 11 to 24H2 on Unsupported Hardware
by
bbearren
2 days, 6 hours ago -
Inetpub can be tricked
by
Susan Bradley
13 hours, 36 minutes ago -
How merge Outlook 2016 .pst file w/into newly created Outlook 2024 install .pst?
by
Tex265
1 day ago -
FBI 2024 Internet Crime Report
by
Alex5723
2 days, 9 hours ago -
Perplexity CEO says its browser will track everything users do online
by
Alex5723
1 day, 21 hours ago -
Login issues with Windows Hello
by
CWBillow
2 days, 21 hours ago -
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
2 days, 8 hours ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
3 days, 8 hours ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
3 days, 8 hours ago -
Google AI is now hallucinating idioms
by
Alex5723
3 days, 9 hours ago -
april update
by
69800
1 day, 13 hours ago -
Windows 11 Insider Preview build 27842 released to Canary
by
joep517
3 days, 10 hours ago -
Quick Fix for Slowing File Explorer
by
Drcard:))
3 days, 10 hours ago -
WuMgr not loading?
by
LHiggins
2 days, 6 hours ago -
Word crashes when accessing Help
by
CWBillow
4 hours ago -
New Microsoft Nag — Danger! Danger! sign-in to your Microsoft Account
by
EricB
3 days, 9 hours ago -
Blank Inetpub folder
by
Susan Bradley
3 days, 7 hours ago -
Google : Extended Repair Program for Pixel 7a
by
Alex5723
3 days, 20 hours ago -
Updates seem to have broken Microsoft Edge
by
rebop2020
3 days, 6 hours ago -
Wait command?
by
CWBillow
3 days, 13 hours ago -
Malwarebytes 5 Free version manual platform updates
by
Bob99
4 days, 3 hours ago -
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
4 days, 9 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.