+ Reply to Thread
Results 1 to 4 of 4

How can I add cells that contain a string and an integer?

  1. #1
    Registered User
    Join Date
    06-10-2015
    Location
    US
    MS-Off Ver
    2010
    Posts
    4

    How can I add cells that contain a string and an integer?

    I work at a library, and I'm supposed to be taking our physical copy of our conference room booking log and making a digital copy of it so it can add up monthly totals for us.

    I have a set up that tentatively has time slots with names of patrons merged into multiple hour slots, which is well and good, but I've no idea how to add up the totals.

    I would like to be able to have the patron's name and then the number of people in the same cell, but the autosum doesn't recognize the number because there's a string attached to it. I've seen a lot of advice on concatenating, but it seems like that isn't quite what I'm looking for. I've tried formatting the cell under the number category. The closest I've gotten was an error that just says #NAME?

    I've got like a tentative grasp of coding and all that, but am actually very new to excel. If anyone could point me to a formula or some formatting that might help me add up the numbers in the same cell without having to separate the number from the string, that would be great. This is what my booking sheet looks like so far:

    screeny.png

    Obviously, when filled out, there will be more cells with patrons and numbers to add up. Surely there's a way to fix my problem without having to dismantle what I have? :(
    Last edited by Rinnian; 06-10-2015 at 08:41 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How can I add cells that contain a string and an integer?

    What you created is fine for presentation...but, not for calculating. It's working against Excel's strengths...instead of with them.

    I'd suggest using two columns for each time slot.
    • the first row would center the time across the two columns
    • the subsequent rows would use the first column for the description and the second column for the headcount.
    something like this:
    Please Login or Register  to view this content.
    Then you could use simple SUM or SUBTOTAL formulas to aggregate activity

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    06-10-2015
    Location
    US
    MS-Off Ver
    2010
    Posts
    4

    Re: How can I add cells that contain a string and an integer?

    I think I can work with that, yes. Now I feel a little silly, because that seems like the obvious solution now. Thank you!

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How can I add cells that contain a string and an integer?

    Glad I could help!

+ 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] concatenating integer and string
    By umbata in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2013, 03:06 PM
  2. [SOLVED] Taking an integer out of a string
    By Mike112 in forum Excel General
    Replies: 13
    Last Post: 06-01-2012, 02:46 PM
  3. Compare string with integer
    By hurriance in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2006, 04:20 AM
  4. Concatenating a string and an integer
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2006, 02:45 PM
  5. Concatenate two variables (String & Integer)
    By Sreenivas Varadhan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2005, 09:35 AM

Tags for this Thread

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