Comparing row data to column data

mikegoyra

New Member
Joined
Apr 4, 2010
Messages
6
Hello,

I' really lost and unsure how to proceed. I think I need to use VBA to accomplish this, but I am open to suggestions. I have a complicated situation. I have 2 sheets in two different workbooks and the data in each sheet is arranged differently. On sheet 1, I have this:

HotelID Tax Name Percentage Flat Tax Tax Authority ID Category Business Model
34 City Tax .024 0 TUpdate1213 1 Merchant
34 Lodging .028 0 TUpdate1213 1 Dual
35 Occupancy .019 1 TUpdate1213 0 Merchant
34 City Tax .014 0 TUpdate1213 1 Merchant
119 Tourism .010 1 TUpdate1213 1 Dual
....and so on....

This sheet has a couple of hundred thousand of these.

The problem is that the second sheet (in another workbook) is arranged differently. There is only one line per ID and all of the various taxes are listed as separate columns, so it looks like this:

CityTax Lodging Occupancy Tourism VAT SalesTax HotelTax .....(about 50 of these)
34 .024 .028 .019 .010 - .10 .03 .........

Each HotelID has just one line with all of the taxes listed as individual columns. I need some sort of formula/script that can match the ID's and transpose all the corresponding taxes (1 column over for the actual value) into the appropriate columns.

Does anyone have any method to accomplish this?
 
transpose all the corresponding taxes (1 column over for the actual value) into the appropriate columns.


Can you paste a sample of the final output, preferably as tables
 
Upvote 0
Hello,

I' really lost and unsure how to proceed. I think I need to use VBA to accomplish this, but I am open to suggestions. I have a complicated situation. I have 2 sheets in two different workbooks and the data in each sheet is arranged differently. On sheet 1, I have this:

HotelID Tax Name Percentage Flat Tax Tax Authority ID Category Business Model
34 City Tax .024 0 TUpdate1213 1 Merchant
34 Lodging .028 0 TUpdate1213 1 Dual
35 Occupancy .019 1 TUpdate1213 0 Merchant
34 City Tax .014 0 TUpdate1213 1 Merchant
119 Tourism .010 1 TUpdate1213 1 Dual
....and so on....

This sheet has a couple of hundred thousand of these.

The problem is that the second sheet (in another workbook) is arranged differently. There is only one line per ID and all of the various taxes are listed as separate columns, so it looks like this:

CityTax Lodging Occupancy Tourism VAT SalesTax HotelTax .....(about 50 of these)
34 .024 .028 .019 .010 - .10 .03 .........

Each HotelID has just one line with all of the taxes listed as individual columns. I need some sort of formula/script that can match the ID's and transpose all the corresponding taxes (1 column over for the actual value) into the appropriate columns.

Does anyone have any method to accomplish this?

you can copy and then use paste special, and select transpose, finally you will get (column2row or row2column) what you want.
 
Upvote 0

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