+ Reply to Thread
Results 1 to 11 of 11

Code description

  1. #1
    Forum Contributor
    Join Date
    04-03-2014
    Location
    Berlin
    MS-Off Ver
    Excel 2010
    Posts
    160

    Code description

    Hi guys,

    I’ve got a code below for which I‘d need a description. Unfortunately, my VBA skills are rather poor, therefore I kindly ask for your support.
    I appreciate it very much, thank you all in advance!

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Code description

    Hi,

    That's rather a lot of code and no doubt could be simplified somewhat. But we need to know what you want to achieve. It's by no means clear what you mean by 'needing a description'.

    Let's start from basics. Upload the workbook and manually add the results you expect to see after you have processed the data so that we can decide the optimum solution which will probably look little like your existing code.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    04-03-2014
    Location
    Berlin
    MS-Off Ver
    Excel 2010
    Posts
    160

    Re: Code description

    Mappe X.xlsm

    Richard,
    Thank your for your reply.

    Please find in the attached workbook the following:
    1. The Input worksheet “Vergütungsdaten_M” (=> the data to be processed)
    2. The Output worksheet “22_Koepfe Detail” (=> the result expected to see)
    3. The auxiliary worksheet “Aux”
    4. The code is available in Module 1.

    Please note that the output worksheet needs to be deleted each time before running the code.

    What I would need, is a so-called guide through the code, namely a short description of the operations/command blocks in the code.
    It is good to hear that the code could be simplified; sadly I do not have the knowledge to do it.

    Once again, thanks a lot!
    Last edited by vio.coman; 12-08-2014 at 06:52 AM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Code description

    Hi,

    Where do the column CK & CT values come from and is the Koepfe column Q the number that appears in the various date columns.

  5. #5
    Forum Contributor
    Join Date
    04-03-2014
    Location
    Berlin
    MS-Off Ver
    Excel 2010
    Posts
    160

    Re: Code description

    Richard,

    That is correct; the Koepfe column Q is the number that appears in the various date columns.

    The columns CK & CT values represent additional information that I use and that will be always available, at it comes directly out of our systems. In other words, only those employees will be collected and listen in worksheet “22_Koepfe Detail” that fulfill the condition “HC” in column “CK” and “aktiv” in column “CT”, respectively.

    Thanks again!

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Code description

    Hi,

    I can see that those values appear in the resultant sheet columns CK & CT, my question was where does this information reside in the “22_Koepfe Detail” sheet.

    Or are you saying that columns CK & CT should always be populated with HC and aktiv. If so what about those cells in CT which aren't showing just 'aktiv'? e.g. CT20

  7. #7
    Forum Contributor
    Join Date
    04-03-2014
    Location
    Berlin
    MS-Off Ver
    Excel 2010
    Posts
    160

    Re: Code description

    Richard,

    those values in the columns CK & CT are not meant to reside in the “22_Koepfe Detail” sheet. However, they are not less important than the other columns, as they serve as "limiting factors" in the code. For example, the code extracts the data only for those employees that are "aktiv" and "HC", meaning only active headcounts are being extracted and arranged in sheet "22_Koepfe Detail". Consequently, whenever the code finds something like cell CT20, it skips the employee.
    I would not mind those two columns very much, as they constitute adjacent information...

    regards

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Code description

    Hi,

    Add another 'Results Sheet' (make sure it has the VBA sheet code name 'Sheet1' and then run this macro.

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    04-03-2014
    Location
    Berlin
    MS-Off Ver
    Excel 2010
    Posts
    160

    Re: Code description

    Richard,

    thank u a lot!
    I'm getting an error at
    Please Login or Register  to view this content.
    I can't really say why..

    regards

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Code description

    Hi,

    Have you added a new sheet and checked that it has the VB code name 'Sheet1'. You can name the tab name anything you like. This sheet will contain your results.

  11. #11
    Forum Contributor
    Join Date
    04-03-2014
    Location
    Berlin
    MS-Off Ver
    Excel 2010
    Posts
    160

    Re: Code description

    Richard,

    sorry for my late reply..
    It works perfectly and I would gladly replace the initial code that I was using, because it requires a lot of resources for which I need a good machine.
    The problem is that, with my old code I create approx. 120-130 of those result sheets, each of which containg different data.
    The structure is of course the same, only the manager, the teams and the employees differ.
    That means one would have to add around 120 new sheets prior running the code.
    Besides, the "Tabelle85" in the code becomes variable, right?

    Question: could one go around this manual creation of "Sheet1", "Sheet2", "Sheet3"...,etc. and the "Tabelle85" problem?

    Thanks again!

    Regards
    Last edited by vio.coman; 12-09-2014 at 05:20 AM.

+ 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. Function required to add description to code within spreadsheet
    By JulieRayner in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2014, 11:13 AM
  2. User Input Description to SKU 'Smart Code'
    By twistedweb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2014, 02:04 PM
  3. [SOLVED] If code same combine the description
    By Klitos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2013, 05:16 AM
  4. lists in excel how to match code with description
    By Nicki1966 in forum Excel General
    Replies: 2
    Last Post: 04-08-2009, 05:41 PM
  5. [SOLVED] enter item code in one column, automatically get description in ne
    By Shelley Kingston in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2006, 07:35 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