+ Reply to Thread
Results 1 to 9 of 9

Need VBA to update new emp through userform to sheet and table both

  1. #1
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Need VBA to update new emp through userform to sheet and table both

    Dear Experts

    I have rawdata emp info where stored emp info

    i have userform to fill details once fill details i submit i want update details into emp info as well simultaneously include in table under corresponding team

    please find the attachment
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,352

    Re: Need VBA to update new emp through userform to sheet and table both

    You mention "userform" but if you aleady have one, why is it not in your w/book?

    A non_VBA example (but not what you want I suspect!)

    in C3

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    with named ranges for shifts / leave and new layout in "Tablex": no colour coding for "Leave" types

    Having spare rows in Excel tables is pointless and can make solutions more complex.

    And there is no obvious reason to separate out Shifts /Leave on separate rows .
    Attached Files Attached Files
    Last edited by JohnTopley; 07-04-2023 at 12:24 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,352

    Re: Need VBA to update new emp through userform to sheet and table both

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need VBA to update new emp through userform to sheet and table both

    Thanks expert!! Its solved i have one small requirement

    if i extent the table for month year, i want code run till date where it end then fill total of workingdays & absent

    is it possible add on it

    thanks
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,352

    Re: Need VBA to update new emp through userform to sheet and table both

    Yes it could be changed but NOT with the current "TABLE format which is why I changed it in my solution : your layout is "pretty" but not "practical",

    Input errors: there are entries in both employee lines for a given date so you need to address this. The easiest way is to have a SINGLE line per employee with a drop-down which has both Shifts+Leave in the list.

    And what about the "Totals" which were in your original post? Better to be positioned in columns C:D followed by the dates in E onwards..

    I await your response to these points before I do further work.
    Last edited by JohnTopley; 07-05-2023 at 03:18 AM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,352

    Re: Need VBA to update new emp through userform to sheet and table both

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 07-05-2023 at 07:44 AM.

  7. #7
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need VBA to update new emp through userform to sheet and table both

    Hi sir i have facing small issue, i just extent table sheet and renamed got error,

    can u make so simple fill your formula in vba code across row 2:2 till Total working days met , and column 2:2 till meet blank cell

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    find the
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,352

    Re: Need VBA to update new emp through userform to sheet and table both

    I wasted my time on a VBA solution so no more from me!!
    Last edited by JohnTopley; 07-05-2023 at 09:33 AM.

  9. #9
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need VBA to update new emp through userform to sheet and table both

    hi sir , sorry for annoying you, thanks for your code its solved i just need it for third option.

+ 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. Update excel table from userform
    By Khanzaki in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-29-2022, 01:15 PM
  2. Help me regarding userform combo box update from Range table
    By mebro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2018, 12:34 AM
  3. [SOLVED] Update Existing Table with UserForm Values
    By TFiske in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 03-23-2018, 08:29 PM
  4. [SOLVED] Userform to Update Table
    By adamheon in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2016, 12:15 PM
  5. Replies: 4
    Last Post: 08-15-2014, 04:02 PM
  6. update value and edit items already update on sheet by userform
    By tjxc32m in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-08-2013, 10:13 AM
  7. Update table from a userform with controls
    By mohanvp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2011, 03:56 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