+ Reply to Thread
Results 1 to 6 of 6

Locating cells with same information

  1. #1
    Registered User
    Join Date
    10-29-2006
    Posts
    3

    Arrow Locating cells with same information

    I am wanting to find a way that will check a series of cells in a column that has the same information in it.

    For example:

    Lets presume Cell A1 has CAHL12 - HJL in it (CAHL is a subject name and HJL is a teachers initials).
    There will be a series of different subjects and teachers names in the same format below it, say from A2 through to A10.

    Now suppose I copy a block of other subjects with accompanying teachers initials to column A from A12 through to A 20.

    The subject name I am not concerned with but the teachers initails is what I am searching for.

    I am wanting to determine if the teacher has already been placed in the column above by searching for identical initials.

    If the formula determines that this is true then I would ideally like to highlight the cells where the teacher initials match within the column.

    I hope that someone can help me with this problem.

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    This is a very interesting problem. It combines a number of concepts that prevent an easy solution. You need to extract the teacher initials from a cell before you can use it. This prevents you using conditional formatting. Also the outcome is dependent on a range of other cells, ie the name has to be in more than 1 cell for the condition to be met.

    I have created a macro for you that will do the job. It assumes that the teacher's initials will always be 3 characters, and will always be the last three characters in the cell. It also assumes that all classes in the same column will be tested for duplicates (this may not be what you want).

    Simply paste this macro into the appropriate sheet module in the workbook.

    Please Login or Register  to view this content.
    Matt
    Last edited by Mallycat; 10-29-2006 at 10:53 PM.

  3. #3
    Registered User
    Join Date
    10-29-2006
    Posts
    3
    Thankyou for your very quick response to my problem.

    I successfully placed the macro into the program which ran successfully yesterday but it has encountered an error today.
    I am certain it is my inadequate ability to use it correctly and not your programming prowess.

    When it did work I found that the column where the doubled teacher name appeared was highlighted instead of just the cell.

    I will try another tactic by placing the satff initials into separate columns next to the subject name and try a search for doubled up names.

    A much less acceptable way of doing things but will eventually do the job for me.

    I just like to think that with the press of a button the computer will do the job for me automatically.

    Thanks again for your assistance.

  4. #4
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    It is very difficult to program effectively without a good set of test data that covers lots of different scenario. Don't give up yet. If you want to send me the file that caused the error (private message), I would happily have a look at it for you.

    Matt

  5. #5
    Registered User
    Join Date
    10-29-2006
    Posts
    3
    Matt,
    Thankyou for your offer of assistance.
    I would like to send to you part of the excel spreadsheet so you can see what I am dealing with but I do not know how this can be done.

    Greg

  6. #6
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    Just zip it up, and then attach it to a post. Then send me a Private message so I know to find it

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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