Macro to allocate line item data

vettetax

New Member
Joined
Jul 5, 2006
Messages
47
My 'Data sheet' contains a combination of values on each row. Certain rows require special allocations, the combination of which is referenced on my 'Allocations' sheet. Certain rows are fine and should not be allocated, but merely left in its virgin state and copied over to the 'Revised Data' sheet. The revised allocated data should then be appropriately referenced on the 'Revised Data' sheet.

Appreciate any help and thank you!


Data Sheet
test1Combo1Label1Label2Label3Label4Value
2Cat/Dog/HouseCatDogHouseCombo100<----value needs to be allocated and Label4 value re-labeled
Cat/Dog/BirdCatDogBirdCombo100<----control data, no impact as Combo1 value is not on the Allocations tab

<tbody>
</tbody>

Allocation Sheet
Combo1MerlinHaloMax
Cat/Dog/House25%25%50%

<tbody>
</tbody>

Revised Data sheet
Label1Label2Label3Label4Allocated Value
CatDogHouseMerlin25<----Combo1 value respectively allocated and Label4 value re-labeled
CatDogHouseHalo25<----Combo1 value respectively allocated and Label4 value re-labeled
CatDogHouseMax50<----Combo1 value respectively allocated and Label4 value re-labeled
CatDogBirdCombo100<----control data, no impact as Combo1 value is not on the Allocations tab

<tbody>
</tbody>
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
If you were to unpivot your allocation sheet, you could setup a sql left join of your data and allocation sheets using MS Query in excel. Then with a simple formula in the resulting table, your could manage your allocation.

This page explains how it can be accomplished. It uses an addin to simplify the ms query sql left join stuff, but the premise is there.
http://www.iwishexcel.com/authors-favorites/2table-left-join/
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

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