+ Reply to Thread
Results 1 to 10 of 10

Cell with many names converted to total hrly wage

  1. #1
    Registered User
    Join Date
    11-08-2019
    Location
    Oklahoma
    MS-Off Ver
    Office 16
    Posts
    4

    Cell with many names converted to total hrly wage

    Hello and thank you for taking the time to help. I have a spreadsheet I am putting together and will submit to my VP's on a quarterly basis. I have attached and example with fake names to better see what I am getting to. What I need is to look at the cell in "H" and depending on what names are in there, it will sum up the hourly wages by looking at the individual wages on the second tab. New lines will be added daily as my assistant managers will input each day. So for example, the total in I2 would be 74.08. I was trying to write a code that would split the names into columns and then look up that way, but I really just keep going in circles on this one, and am not great at code writing to begin with.

    I hope this was not too confusing.

    Thanks,

    Charity
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Cell with many names converted to total hrly wage

    Try this

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    11-08-2019
    Location
    Oklahoma
    MS-Off Ver
    Office 16
    Posts
    4

    Re: Cell with many names converted to total hrly wage

    Oh my goodness that worked. I have been working on that for days! Thank you so very much!!

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Cell with many names converted to total hrly wage

    You are welcome,
    Regards, JLG

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,616

    Re: Cell with many names converted to total hrly wage

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  6. #6
    Registered User
    Join Date
    11-08-2019
    Location
    Oklahoma
    MS-Off Ver
    Office 16
    Posts
    4

    Re: Cell with many names converted to total hrly wage

    Hello again,

    So I tried it on my spreadsheet again, and for some reason, it seems as if it is adding the rows to the row before perhaps. This is what totals come up, even if the names are the same in about 8 of the cells to calculate. I re-created it on my example sheet for your viewing. and if i add rows, do i need to run the macro each time?

    Thanks again for helping!
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this …


    If you do not want to run the code each time you can use a user defined function like

    this formula in cell I2 =MVLookup(H2,'List of Hourly Wages'!$A$2:$B$10,2) then copy down, that's it !

    But as a reminder, the VLOOKUP worksheet function works only if you remove this silly space in front of some of your List names …

    PHP Code: 
    Function MVLookup#(S$, Rg As Range, C%)
         
    Dim A$, V
             A 
    """," Rg.Address(External:=True) & "," ",FALSE),)"
        
    For Each V In Split(S", "):  MVLookup MVLookup Evaluate("IFERROR(VLOOKUP(""" A):  Next
    End 
    Function 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  8. #8
    Registered User
    Join Date
    11-08-2019
    Location
    Oklahoma
    MS-Off Ver
    Office 16
    Posts
    4

    Re: Hi ! Try this …

    Thank you once again. That is EXACTLY what i was looking for. I didn't even realize I had the space

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Thanks for the rep' !

    I find out why my code fails when I manually test the VLOOKUP worksheet function on your data …

  10. #10
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Cell with many names converted to total hrly wage

    Quote Originally Posted by gaelicgirl76 View Post
    Hello again,

    So I tried it on my spreadsheet again, and for some reason, it seems as if it is adding the rows to the row before perhaps. This is what totals come up, even if the names are the same in about 8 of the cells to calculate. I re-created it on my example sheet for your viewing. and if i add rows, do i need to run the macro each time?
    Thanks again for helping!
    Yep, forgot to reset amt to 0. This should fix it.

    Please Login or Register  to view this content.
    End Sub

+ 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] Numberic Indicies converted to Names
    By skeety in forum Excel General
    Replies: 25
    Last Post: 03-04-2018, 11:46 AM
  2. How to read cells values from a converted to excel (converted to exe file)
    By AttalaEA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2014, 02:57 AM
  3. Replies: 3
    Last Post: 07-27-2013, 04:57 AM
  4. Sheet tab name in cell converted to date
    By sinmike in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-25-2013, 09:30 AM
  5. A formula in a cell could not be converted
    By Scubie in forum Excel General
    Replies: 8
    Last Post: 06-24-2011, 10:05 AM
  6. hh:mm converted to decimal in same cell
    By Gair48 in forum Excel General
    Replies: 3
    Last Post: 04-21-2011, 06:02 AM
  7. Can a $figure be converted to words in another cell
    By sbsrose in forum Excel General
    Replies: 2
    Last Post: 08-07-2006, 03:49 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