Macro to compare and move data from one worksheet to another

dwood

New Member
Joined
Nov 29, 2006
Messages
12
I have two worksheets. Sheet 1 contains two columns of data. Column A contains a list of account numbers and column B contains demographic information about the account number in column A. Sheet 2 contains a list of account numbers in column A and Column B is blank. I need a macro that will look at the account numbers in column A and if it finds the identical account number in column A of Sheet B, copy the demographic data in Column B of Sheet A to Column B of Sheet 2. Since the two worksheets do not necessarily contain the same account numbers, they will not match up row by row. If it cannot find a match in Sheet 2 for an account number in Sheet 1, I need it to skip to the next account number and repeat the process. When the macro reaches the last account number in Sheet 1, I need it to stop. This is a reoccurring monthly report with approximately 200 account numbers and the demographic data is carried forward month to month.
 
is it possible to copy 3 column value from Sheet1 for all matches in Sheet2

Sheet1 Content

[TABLE="width: 764"]
<TBODY>[TR]
[TD="align: left"]WP Name</SPAN>
[/TD]
[TD="align: left"]SSR Type</SPAN>
[/TD]
[TD="align: left"]Value</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]SSR Submitted</SPAN>
[/TD]
[TD="align: left"]1. SSR Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]SSR Approved</SPAN>
[/TD]
[TD="align: left"]2. SSR Approved</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]SSR Approved (Rejected)</SPAN>
[/TD]
[TD="align: left"]2.1 SSR Approved (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]BOQ Submitted</SPAN>
[/TD]
[TD="align: left"]3. BOQ Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]BOQ Verfied</SPAN>
[/TD]
[TD="align: left"]4. BOQ Verfied</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]BOQ Verfied (Rejected)</SPAN>
[/TD]
[TD="align: left"]4.1 BOQ Verfied (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD="align: left"]5. EQ Deliveried</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]EQ Received and Material Ready</SPAN>
[/TD]
[TD="align: left"]6. EQ Received and Material Ready</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]Readiness Checked</SPAN>
[/TD]
[TD="align: left"]7. Readiness Checked</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]Readiness Checked (Rejected)</SPAN>
[/TD]
[TD="align: left"]7.1 Readiness Checked (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]PAT Submitted</SPAN>
[/TD]
[TD="align: left"]8. PAT Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]PAT Approved</SPAN>
[/TD]
[TD="align: left"]9. PAT Approved</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]


Sheet2 Content

[TABLE="width: 585"]
<TBODY>[TR]
[TD="align: left"]WP Name</SPAN>
[/TD]
[TD="align: left"]SSR Type</SPAN>
[/TD]
[TD="align: left"]Value</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]SSR Submitted</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]


After Macro the status of sheet2 should be

[TABLE="width: 624"]
<TBODY>[TR]
[TD="align: left"]WP Name</SPAN>
[/TD]
[TD="align: left"]SSR Type</SPAN>
[/TD]
[TD="align: left"]Value</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD="align: left"]5. EQ Deliveried</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]SSR Submitted</SPAN>
[/TD]
[TD="align: left"]1. SSR Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD="align: left"]5. EQ Deliveried</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD="align: left"]EQ Deliveried</SPAN>
[/TD]
[TD="align: left"]5. EQ Deliveried</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]
 
Last edited:
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
sadat2706,

Welcome to the MrExcel forum.

What version of Excel are you using?


Your data structure is different then the data for dwood. And, you do not want to hijack a thread.


Please start your own new Tread, with your own informative Title.


We can not tell what cells, rows, columns, your raw data is in.

Can you post the raw data worksheet, and, post the worksheet results (manually formatted by you) that you are looking for?

To post your data, you can download and install one of the following two programs:
Excel Jeanie
MrExcel HTML Maker


If you are not able to give us screenshots:
You can upload your workbook to Box Net,
sensitive data changed
mark the workbook for sharing
and provide us with a link to your workbook.


Then send me a Private Message with a link to your new thread and I will have a look.
 
Upvote 0
Please help, i will have morethan 20,000 rows so I am just giving a sample

here is the content of sheet1


[TABLE="width: 828"]
<TBODY>[TR]
[TD][/TD]
[TD]A</SPAN>
[/TD]
[TD]B</SPAN>
[/TD]
[TD]C</SPAN>
[/TD]
[/TR]
[TR]
[TD]1</SPAN>
[/TD]
[TD]Acct #</SPAN>
[/TD]
[TD]LS</SPAN>
[/TD]
[TD]Status</SPAN>
[/TD]
[/TR]
[TR]
[TD]2</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]1. SSR Submitted</SPAN>
[/TD]
[TD]SSR Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]3</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2. SSR Approved</SPAN>
[/TD]
[TD]SSR Approved</SPAN>
[/TD]
[/TR]
[TR]
[TD]4</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2.1 SSR Approved (Rejected)</SPAN>
[/TD]
[TD]SSR Approved (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]5</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]3. BOQ Submitted</SPAN>
[/TD]
[TD]BOQ Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]6</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4. BOQ Verfied</SPAN>
[/TD]
[TD]BOQ Verfied</SPAN>
[/TD]
[/TR]
[TR]
[TD]7</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4.1 BOQ Verfied (Rejected)</SPAN>
[/TD]
[TD]BOQ Verfied (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]8</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]5. EQ Deliveried</SPAN>
[/TD]
[TD]EQ Deliveried</SPAN>
[/TD]
[/TR]
[TR]
[TD]9</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]6. EQ Received and Material Ready</SPAN>
[/TD]
[TD]EQ Received and Material Ready</SPAN>
[/TD]
[/TR]
[TR]
[TD]10</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7. Readiness Checked</SPAN>
[/TD]
[TD]Readiness Checked</SPAN>
[/TD]
[/TR]
[TR]
[TD]11</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7.1 Readiness Checked (Rejected)</SPAN>
[/TD]
[TD]Readiness Checked (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]12</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]8. PAT Submitted</SPAN>
[/TD]
[TD]PAT Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]13</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]9. PAT Approved</SPAN>
[/TD]
[TD]PAT Approved</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]



Here is content of Sheet2

[TABLE="width: 921"]
<TBODY>[TR]
[TD][/TD]
[TD]A</SPAN>
[/TD]
[TD]B</SPAN>
[/TD]
[TD]C</SPAN>
[/TD]
[/TR]
[TR]
[TD]1</SPAN>
[/TD]
[TD]Acct #</SPAN>
[/TD]
[TD]LS</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]1. SSR Submitted</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2. SSR Approved</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2.1 SSR Approved (Rejected)</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]3. BOQ Submitted</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4. BOQ Verfied</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4.1 BOQ Verfied (Rejected)</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]5. EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]6. EQ Received and Material Ready</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7. Readiness Checked</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7.1 Readiness Checked (Rejected)</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]8. PAT Submitted</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]9. PAT Approved</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]1. SSR Submitted</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2. SSR Approved</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2.1 SSR Approved (Rejected)</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]3. BOQ Submitted</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4. BOQ Verfied</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4.1 BOQ Verfied (Rejected)</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]5. EQ Deliveried</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]6. EQ Received and Material Ready</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7. Readiness Checked</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7.1 Readiness Checked (Rejected)</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]24</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]8. PAT Submitted</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]9. PAT Approved</SPAN>
[/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]


after macro the Status of sheet 2 should be like bellow

[TABLE="width: 907"]
<TBODY>[TR]
[TD][/TD]
[TD]A</SPAN>
[/TD]
[TD]B</SPAN>
[/TD]
[TD]C</SPAN>
[/TD]
[/TR]
[TR]
[TD]1</SPAN>
[/TD]
[TD]Acct #</SPAN>
[/TD]
[TD]LS</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]1. SSR Submitted</SPAN>
[/TD]
[TD]SSR Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]3</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2. SSR Approved</SPAN>
[/TD]
[TD]SSR Approved</SPAN>
[/TD]
[/TR]
[TR]
[TD]4</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2.1 SSR Approved (Rejected)</SPAN>
[/TD]
[TD]SSR Approved (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]5</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]3. BOQ Submitted</SPAN>
[/TD]
[TD]BOQ Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]6</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4. BOQ Verfied</SPAN>
[/TD]
[TD]BOQ Verfied</SPAN>
[/TD]
[/TR]
[TR]
[TD]7</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4.1 BOQ Verfied (Rejected)</SPAN>
[/TD]
[TD]BOQ Verfied (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]8</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]5. EQ Deliveried</SPAN>
[/TD]
[TD]EQ Deliveried</SPAN>
[/TD]
[/TR]
[TR]
[TD]9</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]6. EQ Received and Material Ready</SPAN>
[/TD]
[TD]EQ Received and Material Ready</SPAN>
[/TD]
[/TR]
[TR]
[TD]10</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7. Readiness Checked</SPAN>
[/TD]
[TD]Readiness Checked</SPAN>
[/TD]
[/TR]
[TR]
[TD]11</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7.1 Readiness Checked (Rejected)</SPAN>
[/TD]
[TD]Readiness Checked (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]12</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]8. PAT Submitted</SPAN>
[/TD]
[TD]PAT Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]13</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]9. PAT Approved</SPAN>
[/TD]
[TD]PAT Approved</SPAN>
[/TD]
[/TR]
[TR]
[TD]14</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]1. SSR Submitted</SPAN>
[/TD]
[TD]SSR Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]15</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2. SSR Approved</SPAN>
[/TD]
[TD]SSR Approved</SPAN>
[/TD]
[/TR]
[TR]
[TD]16</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]2.1 SSR Approved (Rejected)</SPAN>
[/TD]
[TD]SSR Approved (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]17</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]3. BOQ Submitted</SPAN>
[/TD]
[TD]BOQ Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]18</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4. BOQ Verfied</SPAN>
[/TD]
[TD]BOQ Verfied</SPAN>
[/TD]
[/TR]
[TR]
[TD]19</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]4.1 BOQ Verfied (Rejected)</SPAN>
[/TD]
[TD]BOQ Verfied (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]20</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation (New)</SPAN>
[/TD]
[TD]5. EQ Deliveried</SPAN>
[/TD]
[TD]EQ Deliveried</SPAN>
[/TD]
[/TR]
[TR]
[TD]21</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]6. EQ Received and Material Ready</SPAN>
[/TD]
[TD]EQ Received and Material Ready</SPAN>
[/TD]
[/TR]
[TR]
[TD]22</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7. Readiness Checked</SPAN>
[/TD]
[TD]Readiness Checked</SPAN>
[/TD]
[/TR]
[TR]
[TD]23</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]7.1 Readiness Checked (Rejected)</SPAN>
[/TD]
[TD]Readiness Checked (Rejected)</SPAN>
[/TD]
[/TR]
[TR]
[TD]24</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]8. PAT Submitted</SPAN>
[/TD]
[TD]PAT Submitted</SPAN>
[/TD]
[/TR]
[TR]
[TD]25</SPAN>
[/TD]
[TD]P20- OSP Detail Design and Implementation</SPAN>
[/TD]
[TD]9. PAT Approved</SPAN>
[/TD]
[TD]PAT Approved</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]
 
Upvote 0
sadat2706,

Please do not post your questions in threads started by others - - this is known as thread hijacking.

Always start a new thread for your questions and, if you think it helps, provide a link to any other thread as a reference.

Start a new thread for your question and be sure to give it a search friendly title that accurately describes your need.


After you start a new thread (as described above), then send me a Private Message with a link to your new thread, and, I will have a look at it.
 
Upvote 0
dwood,


Sample worksheets:


Sheet1

*AB
account numberdemographic
demographic for 12345
demographic for 12554
demographic for 12555
**

<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 127px"><COL style="WIDTH: 209px"></COLGROUP><TBODY>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]12345[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: right"]12554[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: right"]12555[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]

</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4




Sheet2

*AB
account numberdemographic
*
*
*
*
**

<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 127px"><COL style="WIDTH: 209px"></COLGROUP><TBODY>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]12121[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: right"]12345[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: right"]12350[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: right"]12555[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]

</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4




After the macro:


Sheet2

*AB
account numberdemographic
*
demographic for 12345
*
demographic for 12555
**

<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 127px"><COL style="WIDTH: 209px"></COLGROUP><TBODY>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]12121[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: right"]12345[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: right"]12350[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: right"]12555[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]

</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4




Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).


1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
2. Open your workbook
3. Press the keys ALT + F11 to open the Visual Basic Editor
4. Press the keys ALT + I to activate the Insert menu
5. Press M to insert a Standard Module
6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
7. Press the keys ALT + Q to exit the Editor, and return to Excel
8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.


Code:
Option Explicit
Sub UpdateW2()
' hiker95, 06/16/2011
' http://www.mrexcel.com/forum/showthread.php?t=557784
Dim w1 As Worksheet, w2 As Worksheet
Dim c As Range, FR As Long
Application.ScreenUpdating = False
Set w1 = Worksheets("Sheet1")
Set w2 = Worksheets("Sheet2")
For Each c In w1.Range("A2", w1.Range("A" & Rows.Count).End(xlUp))
  FR = 0
  On Error Resume Next
  FR = Application.Match(c, w2.Columns(1), 0)
  On Error GoTo 0
  If FR <> 0 Then w2.Range("B" & FR).Value = c.Offset(, 1)
Next c
Application.ScreenUpdating = True
End Sub


Then run the UpdateW2 macro.


If the above macro does not work correctly, then we will need screenshots of the two worksheets:

To attach screenshots, see below in my Signature block: Post a screen shot with one of these:[/QUOTE I used this Macro in a similar situation, however my account number will duplicate in the 2nd worksheet and I need for the macro to update each account number in the second worksheet that it matches even if it is a duplicate, could you advise how to revise the macro for that?]
 
Upvote 0
pbeuaprey,

Please do not post your questions in threads started by others - - this is known as thread hijacking.

Always start a new thread for your questions and, if you think it helps, provide a link to any other thread as a reference.

Start a new thread for your question and be sure to give it a search friendly title that accurately describes your need.


After you start a new thread (as described above), then send me a Private Message with a link to your new thread, and, I will have a look at it.
 
Upvote 0
Hi Hiker95,

Sorry to disturb you.
Can you please help me to create macro to calculate Average and Standrd deviation columnwise, example is posted in my post. Please....
 
Upvote 0
Hi,

I have a question. Can you help me with building a macro for my problem?
I have to separate excel files that difference from name every time.
Can rename them to perform the merge.

1 excel file for my product that I have:
ABCDE
Product codeDescriptionStorageSoltBarcode
1Rent10.908718481280232

1 csv file that I retrieve from my webpage. Extracted column with text to column. Deleted column A.
ABCDEFG
_sku"post_title""_stock""_wpm_gtin_code""post_type""post_parent""ID"
95818023​
"Auto + Vliegtuig Race set 10-delig""""8718481280232""product""0""8268"
95818025​
"Kleiset met gereedschap 10-delig""""8718053880259""product""0""8273"
95818041​
"Insteek Mozaïek set 210-delig""""8717154280418""product""0""8274"
95818045​
"Trapveer met Regenboog Kleuren""""8718053880457""product""0""8276"

Only the barcode is the same as "_wpm_gtin_code" nut without "
Is it possible to compare the barcode with "_wpm_gtin_code" and then merge the storage in H like "1"

Hope you can help me.
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top