How to calculate the sum in this situation?

rufiqcavadov

New Member
Joined
Apr 28, 2023
Messages
10
Office Version
  1. 2021
Platform
  1. Windows
Hello everyone,

In Excel, I entered two numbers in a single cell by using the Alt+Enter command to add a line break. I want to calculate the sum of these numbers, but I don't want to use VBA.

I know ChatGPT can write VBA code, but I am looking for a non-VBA solution. Could someone help me with this?

Screenshot 2024-12-19 214938.png


Thank you in advance!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
How about
Excel Formula:
=LEFT(G7,FIND(CHAR(10),G7)-1)+MID(G7,FIND(CHAR(10),G7)+1,100)
 
Upvote 0
It's a linefeed character (ie Alt Enter)
Okay, understandable. Thank you for helping. I want to ask something else. Is it a short form of this function?

For Example. This function only works for G7 row.
 
Upvote 0
You can drag the formula down for other rows.
 
Upvote 0
It's a bit more challenging without TEXTSPLIT in 365, but you can try:
Book2
GHI
71500 25009000
81500 3500
Sheet4
Cell Formulas
RangeFormula
I7I7=LET(c,CHAR(10),t,TEXTJOIN(c,,G7:G8),r,LEN(t) - LEN(SUBSTITUTE(t,c, ""))+1,e,LEN(t),SUM(--MID(SUBSTITUTE(t,c,REPT(" ",e)),(SEQUENCE(r)-1)*e+1,e)))
 
Upvote 0
Are you trying to add all the cells together to give one total?
 
Upvote 0

Forum statistics

Threads
1,225,738
Messages
6,186,728
Members
453,368
Latest member
positivemind

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top