+ Reply to Thread
Results 1 to 11 of 11

sum leftmost character from each cell in an array

  1. #1
    Registered User
    Join Date
    07-14-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac 2011
    Posts
    14

    sum leftmost character from each cell in an array

    Hi,

    I'm trying to get the sum of the leftmost character in each cell in part of a row. In the attached example, I'd like to get the result 17.

    I tried this formula but it didn't work: =sum(--left(B1:H1,1))

    Thank you!

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,075

    Re: sum leftmost character from each cell in an array

    Did you confirm that formula with Ctrl Shift Enter, rather than just Enter?

  3. #3
    Registered User
    Join Date
    07-14-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac 2011
    Posts
    14

    Re: sum leftmost character from each cell in an array

    Just realized that it works if I make it an array formula. But the problem is that I want it to function as an array formula going down the whole column. Every time a new row is entered, I want the formula to calculate for that row. It's like I need it to do be an array in both directions.

    This worked for a single row: =arrayformula(SUM(--LEFT(E2:J2,1)))

    But then I tried this to get it to repeat down the column and it didn't work: =arrayformula(SUM(--LEFT(E:J,1)))

    Thank you!!

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,075

    Re: sum leftmost character from each cell in an array

    Are you doing this in Excel, or some other app?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,709

    Re: sum leftmost character from each cell in an array

    ARRAYFORMULA is not an Excel function - are you using Google Sheets?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    07-14-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac 2011
    Posts
    14

    Re: sum leftmost character from each cell in an array

    Yeah, I'm in Google Sheets. I shouldn't have assumed it would work the same way. Sorry about that.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,709

    Re: sum leftmost character from each cell in an array

    Yes, you should have mentioned it, and I have now moved this thread to the section where you should have asked it.

  8. #8
    Registered User
    Join Date
    07-14-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac 2011
    Posts
    14

    Re: sum leftmost character from each cell in an array

    Thanks. How do I get to that thread?

  9. #9
    Registered User
    Join Date
    07-14-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac 2011
    Posts
    14

    Re: sum leftmost character from each cell in an array

    Thanks, Fluff13. Sorry to waste your time.

  10. #10
    Registered User
    Join Date
    07-14-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac 2011
    Posts
    14

    Re: sum leftmost character from each cell in an array

    Oh, I see. It's here. Sorry.

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: sum leftmost character from each cell in an array

    I am not sure if you only want to get the sum of the leftmost character of cells in columns B:H of the current row, or if you want a running total.
    If only in a single row then please try: =SUMPRODUCT(--LEFT(B1:H1,1))
    If a running total then please try: =SUMPRODUCT(--LEFT(B$1:H1,1))
    If neither of these does what you want then please utilize the instructions in the banner at the top of the page to upload a sample .xlsx file.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Get leftmost character of a filtered line
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2016, 10:06 AM
  2. Replies: 7
    Last Post: 02-01-2016, 03:49 AM
  3. [SOLVED] Fill specific value after leftmost used cell
    By NewDJ in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-10-2015, 04:02 PM
  4. how to reference leftmost cell in row
    By bsapaka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2014, 02:59 PM
  5. Replies: 5
    Last Post: 09-12-2012, 01:27 PM
  6. Formula to display leftmost cell in a row with a value
    By nuentes in forum Excel General
    Replies: 1
    Last Post: 01-15-2009, 06:58 PM
  7. Replies: 5
    Last Post: 08-10-2007, 10:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1