Results 1 to 13 of 13

Run Macro 1 if Value X exists or Macro B if Value X exists twice

Threaded View

  1. #1
    Registered User
    Join Date
    07-14-2009
    Location
    Brighton, England
    MS-Off Ver
    Excel 97
    Posts
    49

    Run Macro 1 if Value X exists or Macro B if Value X exists twice

    Hello there, me again! As always many thanks for all and any help I receive with this next problem.

    This is quite a complicated one so please feel free to help in chunks rather than the whole at once...

    From Row 9 onwards column A and C are checked.

    Condition 1

    If in column A and column C the same values exists in the next row down e.g. A9 = JONES C9 = Peter and A10 = JONES C10 = Peter then the data in column E is checked for those two rows.

    In the two checked rows in Column E, data which contains the words Pre-int, Upper-int, Int, Elementary, Advanced or Beginner is then inserted into D5 on spreadsheets titled "Schedule A GE2" and "Schedule B GE2".

    Data which contains the words Mid, High, Low or IELTS is inserted into D7 on spreadsheets titled "Schedule A GE2" and "Schedule B GE2".

    If the data in D5 contains the words Upper-int or Advanced then "Schedule A GE2" is duplicated as a new spreadsheet in the same workbook with the spreadsheet name as the data from column A and column C from which the data was taken. If not then "Schedule B GE2" is duplicated and the same done instead.

    Then in A5 on the new spreadsheet the data "Name: &Column A &Column C" is inserted.

    The macro then continues checking down Column A and Column C for more data where there are two rows which are the same.

    Condition 2

    If the data in two rows is not the same i.e. A9 = JONES C9 = Peter and A10 = RUPERT C9 = Peter then the following is done instead.

    In the two checked rows in Column E, data which contains the words Pre-int, Upper-int, Int, Elementary, Advanced or Beginner is then inserted into D5 on spreadsheets titled "Schedule A GE1" and "Schedule B GE1".

    If the data in D5 contains the words Upper-int or Advanced then "Schedule A GE1" is duplicated as a new spreadsheet in the same workbook with the spreadsheet name as the data from column A and column C from which the data was taken. If not then "Schedule B GE1" is duplicated and the same done instead.

    Then in A5 on the new spreadsheet the data "Name: &Column A &Column C" is inserted.

    The macro then continues checking down Column A and Column C for more data where there are two rows which are not the same.


    A huge thanks for everything helped with here, I realise I am asking a great deal.

    Tom
    Last edited by TBrooker; 07-23-2009 at 07:30 AM.

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