• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Dynamic range calculation line by line|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Dynamic range calculation line by line|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Dynamic range calculation line by l…
sp_PrintTopic sp_TopicIcon
Dynamic range calculation line by line
Avatar
austris bahanovskis
Member
Members
Level 0
Forum Posts: 14
Member Since:
July 13, 2021
sp_UserOfflineSmall Offline
1
April 30, 2022 - 5:30 am
sp_Permalink sp_Print

Good day!
I'm hoping that the answer to this is embarrassingly simple but for the life of me I cannot figure it out...

I'm trying to come up with a formula that would perform a calculation on a dynamic array but on a line-by-line basis, and hence it would return also a dynamic array with 1 column and as many rows as there in the source array.

For example - I've got a 4x5 dynamic array:

=RANDARRAY(4,5,0,10,TRUE)

then in F1 I would want to have a formula that returns a dynamic array with 1 column and 4 rows (because the 1st array has 4 rows) and each row in there would show the total from the 1st array's their corresponding row - meaning in:

F1 would show total of A1:E1, in 

F2 would show total of A2:E2, in 

F3 would show total A3:E3, etc.

The point is that I don't want to fill down F1:F4 mechanically - I want to have a formula that returns the dynamic array by itself.

Surely that can be done, can't it?

sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4438
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
May 1, 2022 - 4:16 pm
sp_Permalink sp_Print

Hi Austris,

I'm not sure how you'd write a formula to do this, sorry. However, if you put your data in an Excel Table the formula e.g. =SUM(A1:E1) will automatically copy down as you add more data.

Mynda

Avatar
Riny van Eekelen
Örnsköldsvik, Sweden
Moderator
Members


Trusted Members

Moderators

Power BI
Level 0
Forum Posts: 439
Member Since:
January 31, 2022
sp_UserOfflineSmall Offline
3
May 1, 2022 - 5:34 pm
sp_Permalink sp_Print sp_EditHistory

In F1, that would be:

=BYROW(A1#,LAMBDA(a,SUM(a)))

Screenshot-2022-05-01-at-09.33.18.pngImage Enlarger

A1 contains your RANDARRAY function.

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot-2022-05-01-at-09.33.18.png (16 KB)
sp_AnswersTopicAnswer
Answers Post
Avatar
austris bahanovskis
Member
Members
Level 0
Forum Posts: 14
Member Since:
July 13, 2021
sp_UserOfflineSmall Offline
4
May 1, 2022 - 9:49 pm
sp_Permalink sp_Print

Thanks Mynda - yeah, table could do it mechanically but without the spill unfortunately.

Thanks Riny - That's exactly the thing I'm after!! Thank you so much - (our IT haven't released the byrow/lambda just yet so I wasn't even looking for them but now this makes so much sense!)

Avatar
Fluff
Member
Members
Level 0
Forum Posts: 31
Member Since:
July 31, 2020
sp_UserOfflineSmall Offline
5
May 2, 2022 - 12:30 am
sp_Permalink sp_Print

Another option

=MMULT(A1#,SEQUENCE(COLUMNS(A1#),,,0))

Avatar
austris bahanovskis
Member
Members
Level 0
Forum Posts: 14
Member Since:
July 13, 2021
sp_UserOfflineSmall Offline
6
May 2, 2022 - 11:43 pm
sp_Permalink
Awaiting Moderation

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: David, Dario Serrati, yonatan zelig, Christopher Anderson
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
yashal minahil
Oluwadamilola Ogun
Yannik H
dectator mang
Francis Drouillard
Orlando Inocente
Jovitha Clemence
Maloxat Axmatovna
Ricardo Freitas
Marko Meglic
Forum Stats:
Groups: 3
Forums: 24
Topics: 6200
Posts: 27182

 

Member Stats:
Guest Posters: 49
Members: 31861
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.