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
-
Uninstalr Updates (Awaiting moderation)
by
jv16
2 hours, 4 minutes ago -
Apple zero days for April
by
Susan Bradley
3 hours, 2 minutes ago -
CVE program gets last-minute funding from CISA – and maybe a new home
by
Nibbled To Death By Ducks
4 hours, 55 minutes ago -
Whistleblower describes DOGE IT dept rumpus at America’s labor watchdog
by
Nibbled To Death By Ducks
5 hours, 5 minutes ago -
Seeing BSOD’s on 24H2?
by
Susan Bradley
7 hours, 55 minutes ago -
TUT For Private Llama LLM, Local Installation and Isolated from the Internet.
by
bbearren
11 hours, 21 minutes ago -
Upgrade from Windows 10 to 11
by
Holdsworth8
13 hours, 45 minutes ago -
Microsoft : AI-powered deception: Emerging fraud threats and countermeasures
by
Alex5723
16 hours, 35 minutes ago -
0patch
by
WSjcgc50
4 hours, 20 minutes ago -
Devices might encounter blue screen exception with the recent Windows updates
by
Susan Bradley
9 hours, 57 minutes ago -
Windows 11 Insider Preview Build 22631.5261 (23H2) released to Release Preview
by
joep517
19 hours, 34 minutes ago -
Problem opening image attachments
by
RobertG
21 hours, 9 minutes ago -
advice for setting up a new windows computer
by
routtco1001
1 day, 11 hours ago -
It’s Identity Theft Day!
by
Susan Bradley
16 hours, 11 minutes ago -
Android 15 require minimum 32GB of storage
by
Alex5723
1 day, 16 hours ago -
Mac Mini 2018, iPhone 6s 2015 Are Now Vintage
by
Alex5723
1 day, 16 hours ago -
Hertz says hackers stole customer credit card and driver’s license data
by
Alex5723
1 day, 17 hours ago -
Firefox became sluggish
by
Rick Corbett
1 day, 14 hours ago -
Windows 10 Build 19045.5794 (22H2) to Release Preview Channel
by
joep517
1 day, 21 hours ago -
Windows 11 Insider Preview Build 22635.5235 (23H2) released to BETA
by
joep517
1 day, 21 hours ago -
A Funny Thing Happened on the Way to the Forum
by
bbearren
19 hours, 1 minute ago -
Download speeds only 0.3Mbps after 24H2 upgrade on WiFi and Ethernet
by
John
3 hours, 42 minutes ago -
T-Mobile 5G Wireless Internet
by
WSmmi16
19 hours, 42 minutes ago -
Clock missing above calendar in Windows 10
by
WSCape Sand
20 hours, 54 minutes ago -
Formula to Calculate Q1, Q2, Q3, or Q4 of the Year?
by
WSJon5
2 days, 12 hours ago -
The time has come for AI-generated art
by
Catherine Barrett
1 day, 16 hours ago -
Hackers are using two-factor authentication to infect you
by
B. Livingston
2 days, 2 hours ago -
23 and you
by
Max Stul Oppenheimer
2 days, 9 hours ago -
April’s deluge of patches
by
Susan Bradley
13 hours, 27 minutes ago -
Windows 11 Windows Updater question
by
Tex265
3 hours, 23 minutes 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.