How to use Hlook up with a macro

Superfly3372

New Member
Joined
Jun 20, 2006
Messages
34
Not sure how to get this done. Sheet one A1:EY1 are column headers which start off the same eachtime the workbook is opened. Data (numberic and text) will be copied and pasted into A2:EY? (? because the number of rows will be different every time). I need a macro to rearrange columns either based on a macro or an Hlook macro located in another worksheet.

Example
A1:Batch ID B1:ClmStatus C1:ClaimID D1:FinProd
12345 Paid Hosp CCA
99999 OPEN Hosp CCA
98574 Paid Clinic CCA

I need the headers along with all the data rearranged the same way when the macro is run.

A1:ClaimID B1:FinProd C1:BatchId D1:ClaimStauts
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Use the macro recorder to go through the steps one time. Then after it is finished you can edit the macro to make it more generic. If you have questions about that, then post back with your macro
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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