I have a personal project that requires obtaining information from multiple cells in a worksheet and transferring that various information to other worksheets. I have no knowledge of macro, but I know what I need to have done must be be done with a macro.. I seek the help of the Excel gurus to offer me with a code (and hopefully explain how it works). I AM HOPING THE EXPERTS WILL HELP ME WITH THIS CHALLENGE.
Since there is no guarantee the information in a particular row for every instance, I need Excel to look for a string in Column A and then find the contents of the cell beneath (or adjacent to) that string.. and then make a list of that information on a different worksheet.
The information will be manually copied/pasted onto SHEET1 by me before I run the macro.. most of the relevant data will be in Column A and B
1) When the macro is run in SHEET1, I want Excel to look along columns A:B and find the Employee#, the Last name, the First name, the gender, and the date of birth and copy that data on a separate sheet (called LIST1). The next time the macro is run, Excel should copy the new information below the previous entry. Also, it would be good to have Excel notice the MALE or FEMALE in SHEET1 and convert that to "Mr." or "Ms."
2)When the macro is run in SHEET1, I also want Excel to form a similar list on worksheet LIST2. In this worksheet, I need Excel to concatenate the three names of the employee and enter it in one cell; and enter the employee# and the adjacent cell. Similar to LIST1, Excel should copy the new data below the previous entry.
3)In the worksheet FORM1, I want Excel to copy certain information from SHEET1 all concatenated in one cell. I intend to use this to print the address on envelopes. So in FORM1 in one particular cell, Excel should copy the three names; drop down a line; copy STREET1 and STREET2 with a space in between; drop a line; copy the CITY, STATE, and ZIP (with the necessary spaces and comma) or the "Primary Address". When the macro is run again, Excel should simply write the new information over the previous in that same cell.
4) In worksheet FORM2, the function will be similar to FORM1 except that on this worksheet, Excel uses the information found under "Mailing Address" in SHEET1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Employee#
[/TD]
[TD][/TD]
[TD][/TD]
[TD]12345678[/TD]
[TD]Smith[/TD]
[TD]John[/TD]
[TD]Mr.[/TD]
[TD]01/02/1982[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]12345678
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]John Doe Smith[/TD]
[TD]12345678[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]Basic Information
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]FIRST NAME
[/TD]
[TD]John
[/TD]
[TD][/TD]
[TD]Mr. John Doe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]MIDDLE NAME
[/TD]
[TD]Doe
[/TD]
[TD][/TD]
[TD]123 Any Street[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]LAST NAME
[/TD]
[TD]Smith
[/TD]
[TD][/TD]
[TD]Apt #111[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]SUFFIX
[/TD]
[TD]Jr
[/TD]
[TD][/TD]
[TD]Houston, TX 77001[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD]DOB
[/TD]
[TD]01/02/1982
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18
[/TD]
[TD]SEX
[/TD]
[TD]Male
[/TD]
[TD][/TD]
[TD]Mr. John Doe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20
[/TD]
[TD]Physical Address
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD]456 This Lane[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD]Street1
[/TD]
[TD]123 Any Street
[/TD]
[TD][/TD]
[TD]-[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22
[/TD]
[TD]Street2
[/TD]
[TD]Apt #111
[/TD]
[TD][/TD]
[TD]Dallas, TX 77007[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23
[/TD]
[TD]City
[/TD]
[TD]Houston
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]24
[/TD]
[TD]State
[/TD]
[TD]TX
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25
[/TD]
[TD]Zip
[/TD]
[TD]77001
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]30
[/TD]
[TD]Mailing Address
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]31
[/TD]
[TD]Street1
[/TD]
[TD]456 This Lane
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]32
[/TD]
[TD]Street2
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]33
[/TD]
[TD]City
[/TD]
[TD]Dallas
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]34
[/TD]
[TD]State
[/TD]
[TD]TX
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]35
[/TD]
[TD]ZIP
[/TD]
[TD]77007
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Since there is no guarantee the information in a particular row for every instance, I need Excel to look for a string in Column A and then find the contents of the cell beneath (or adjacent to) that string.. and then make a list of that information on a different worksheet.
The information will be manually copied/pasted onto SHEET1 by me before I run the macro.. most of the relevant data will be in Column A and B
1) When the macro is run in SHEET1, I want Excel to look along columns A:B and find the Employee#, the Last name, the First name, the gender, and the date of birth and copy that data on a separate sheet (called LIST1). The next time the macro is run, Excel should copy the new information below the previous entry. Also, it would be good to have Excel notice the MALE or FEMALE in SHEET1 and convert that to "Mr." or "Ms."
2)When the macro is run in SHEET1, I also want Excel to form a similar list on worksheet LIST2. In this worksheet, I need Excel to concatenate the three names of the employee and enter it in one cell; and enter the employee# and the adjacent cell. Similar to LIST1, Excel should copy the new data below the previous entry.
3)In the worksheet FORM1, I want Excel to copy certain information from SHEET1 all concatenated in one cell. I intend to use this to print the address on envelopes. So in FORM1 in one particular cell, Excel should copy the three names; drop down a line; copy STREET1 and STREET2 with a space in between; drop a line; copy the CITY, STATE, and ZIP (with the necessary spaces and comma) or the "Primary Address". When the macro is run again, Excel should simply write the new information over the previous in that same cell.
4) In worksheet FORM2, the function will be similar to FORM1 except that on this worksheet, Excel uses the information found under "Mailing Address" in SHEET1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Employee#
[/TD]
[TD][/TD]
[TD][/TD]
[TD]12345678[/TD]
[TD]Smith[/TD]
[TD]John[/TD]
[TD]Mr.[/TD]
[TD]01/02/1982[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]12345678
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]John Doe Smith[/TD]
[TD]12345678[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]Basic Information
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]FIRST NAME
[/TD]
[TD]John
[/TD]
[TD][/TD]
[TD]Mr. John Doe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]MIDDLE NAME
[/TD]
[TD]Doe
[/TD]
[TD][/TD]
[TD]123 Any Street[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]LAST NAME
[/TD]
[TD]Smith
[/TD]
[TD][/TD]
[TD]Apt #111[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]SUFFIX
[/TD]
[TD]Jr
[/TD]
[TD][/TD]
[TD]Houston, TX 77001[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD]DOB
[/TD]
[TD]01/02/1982
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18
[/TD]
[TD]SEX
[/TD]
[TD]Male
[/TD]
[TD][/TD]
[TD]Mr. John Doe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20
[/TD]
[TD]Physical Address
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD]456 This Lane[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD]Street1
[/TD]
[TD]123 Any Street
[/TD]
[TD][/TD]
[TD]-[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22
[/TD]
[TD]Street2
[/TD]
[TD]Apt #111
[/TD]
[TD][/TD]
[TD]Dallas, TX 77007[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23
[/TD]
[TD]City
[/TD]
[TD]Houston
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]24
[/TD]
[TD]State
[/TD]
[TD]TX
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25
[/TD]
[TD]Zip
[/TD]
[TD]77001
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]30
[/TD]
[TD]Mailing Address
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]31
[/TD]
[TD]Street1
[/TD]
[TD]456 This Lane
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]32
[/TD]
[TD]Street2
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]33
[/TD]
[TD]City
[/TD]
[TD]Dallas
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]34
[/TD]
[TD]State
[/TD]
[TD]TX
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]35
[/TD]
[TD]ZIP
[/TD]
[TD]77007
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]