Posts by Hyperventilate


    In your 'New Sheet' , the Employee Contact No 8565875655 appears twice (row 5 and row 9) with, for example, two different first names

    Could the combination of the the Employee Contact No with, say, the Family Name ... be your Unique Identifier ...?;)

    Currently, I just go for exact matches and reject anything that is even slightly different. Contact numbers don't repeat in my files, but since this is a dummy db I created just to demonstrate what I need, I've not noticed that. My bad. :saint:

    Can you post a sample of File 1 and File 2? You can de-sensitize the data if necessary and you can include a few dozen rows of data. Also, what do you want to do if there is an employee with the same details in File 1?

    Please see attached sample file. I need to see if sheet1 employees exist in my database (sheet2) based on their name, father's name, mobile and email. For example, (Sl.1) from sheet one exists in sheet two as (Sl. 29.)

    If there is a match found, I just need them to be moved to Sheet 3 or a new book.

    I have an Excel sheet (File 1) with huge employee data running into tens of thousand of rows. Sometimes I get sent another spreadsheet (File 2) with a few hundred employee data and I am asked to find if these employees exist in my database based on their name, mobile and email. Now I cannot run a vlookup because it will only pull out the same name from File 1, but it won't necessarily be the same employee. I need a macro to compare the name, phone, email for an employee in File 2 and tell me if there is an employee with the same details in File 1. These criteria keep changing too, sometimes I am asked to compare based on Surname, Maiden Name and so on...

    You haven't created a Sub, for code to run it needs to be a Sub or Function. You would also need to enter the name of your image

    1. Sub GetImageDimensions()
    2. With CreateObject("shell.application").Namespace("E:\OF\")
    3. c_00 = .getdetailsof(.Items.Item("example.jpg"), 27)
    4. End With
    5. With CreateObject("shell.application").Namespace("E:\OF\")
    6. c_00 = .getdetailsof(.Items.Item("example.jpg"), 28)
    7. End With
    8. End Sub

    The better option is to download the example workbook from Jolivane's link. Then post back for help using it.

    Thank you for the guidance Roy.

    look under the "p" for pixels

    Thanks much for the link; looks like a treasure house of code. I'm just starting out with Macros, the code in the links don't seem to work for me. Even after inserting them under a module, when I try to run them I get a message saying there are no macros to run. I presume I need to do something else apart from just copy pasting them?

    My requirement is pretty complicated (at least to me!). I need a macro to do the following:

    I have an organizational event coming up for which I need to conduct a game. The employee data is attached (non sensitive) Sample (1).xlsx and they have to be distributed in the following manner:

    1. Determine the number of seats and slots in the game. Seats are for employees to sit and slots are the different timings of the game (usually two different slots)

    2. Determine count of male/female (Column C) and department count (Column D) for each gender

    3. Distribute the employees equally gender-wise and department-wise among the available seats and slots


    1. There are 400 employees, 200 male and 200 female. 50 employees from each department (50x4 departments = 200 employees each for male and female).

    2. 200 seats in each slot and two slots.

    3. I need to have 25 males from HR, 25 from IT, 25 from House and 25 from Admin in the first slot (100 males ) along with the same order of female candidates (100 females).

    4. The same distribution again for the second slot which makes it total of 400 employees equally distributed among the available seats and slots.

    Since this happens often, I also need some flexibility to handle it if the slots and seats change.