+ Reply to Thread
Results 1 to 3 of 3

Macro to copy columns from 1st sheet to 2nd according to mapping-p

  1. #1
    Pawan
    Guest

    Macro to copy columns from 1st sheet to 2nd according to mapping-p

    This one is somewhat difficult. I have two different workbooks. In first
    workbook I have 10 columns (say) and in the second, I have more (or also less
    in some cases) columns than the first, let us assume 15.

    Now I have to map parameters of both the sheets. I want to design a form
    which will show column names of both the sheets and I will choose the
    mapping. means I will define there which parameter in first sheet is to be
    mapped to which parametr in second sheet. After doing this, the macro should
    copy the contents of 1st column (except title) to the second column.

    The second sheet will be always blank with all columns having titles.

    e.g. I have sheet 1 with columns A to J and I ahve sheet 2 with columns A to
    O. The form will show TITLES (like 'school name' and not column names like
    A,B,...)of columns and I will map corresponding columns (How to do that in
    form, I don't know). Then contents from first sheet to second sheet will get
    copied according to mapping. means if A (with title 'school name') is mapped
    to E (with title 'institute name'), then contents of A will be cpoied to
    column E with title remaing the same ('institute name').

    This problem seems to be difficult, but I will be very thankful to whoever
    will do it. It will save a lot of time...
    Thank You...

  2. #2
    Registered User
    Join Date
    06-21-2005
    Posts
    2
    This is possible, but very involved. Do your "blank" sheets always contain the same columns, or is it different every single time? What I'm trying to determine is whether or not we would be able to store a kind of "map" in your blank worksheet to automatically tell the first worksheet where to put what, rather than designing a complicated userform.

  3. #3
    Pawan
    Guest

    Re: Macro to copy columns from 1st sheet to 2nd according to mappi

    Actually the blank sheet will have different columns each time. Few columns
    may repeat and few may not. Mapping for particular column will be almost same
    everytime, but it may change occassionaly. e.g. If there is column "school
    name", it will be mapped to "institute name" always. But if "institute name"
    doesnt exist in blank sheet, it will be mapped to some other column (say
    "college name"). Also in some cases, columns of first sheet need not be
    mapped to any column at all.
    Can you help me?


    "JPW" wrote:

    >
    > This is possible, but very involved. Do your "blank" sheets always
    > contain the same columns, or is it different every single time? What
    > I'm trying to determine is whether or not we would be able to store a
    > kind of "map" in your blank worksheet to automatically tell the first
    > worksheet where to put what, rather than designing a complicated
    > userform.
    >
    >
    > --
    > JPW
    > ------------------------------------------------------------------------
    > JPW's Profile: http://www.excelforum.com/member.php...o&userid=24488
    > View this thread: http://www.excelforum.com/showthread...hreadid=380809
    >
    >


+ 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