Excel macro to find combinaitons

sriram170

Board Regular
Joined
Jan 27, 2012
Messages
99
hi i need a macro for the below details.. i have been using formulas to get the details but it takes lot of time pls help...


I have a file with 4 columns filled with details as listed below
[TABLE="class: cms_table"]
<tbody>[TR]
[TD]GL[/TD]
[TD]GL[/TD]
[TD]CC[/TD]
[TD]CC[/TD]
[TD]GL combination[/TD]
[TD]CC combination[/TD]
[TD]Input GL[/TD]
[TD]Input cc[/TD]
[TD]Yes/no[/TD]
[/TR]
[TR]
[TD]164001[/TD]
[TD]164005[/TD]
[TD]8000[/TD]
[TD]8100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164006[/TD]
[TD]164011[/TD]
[TD]8101[/TD]
[TD]8104[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164012[/TD]
[TD]164017[/TD]
[TD]8106[/TD]
[TD]8109[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164018[/TD]
[TD]164023[/TD]
[TD]8111[/TD]
[TD]8114[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164024[/TD]
[TD]164029[/TD]
[TD]8116[/TD]
[TD]8119[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164030[/TD]
[TD]164035[/TD]
[TD]8121[/TD]
[TD]8124[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


If I fill the INPUT GL column and INPUT CC column it should check with each combinations form gl and CC column, let me say if I give 164002 in gl and 8090 then it will check with each combinations from top to bottom if it finds in any row then it should result in yes.. please find a example given below

[TABLE="class: cms_table"]
<tbody>[TR]
[TD]GL[/TD]
[TD]GL[/TD]
[TD]CC[/TD]
[TD]CC[/TD]
[TD]GL combination[/TD]
[TD]CC combination[/TD]
[TD]Input GL[/TD]
[TD]Input cc[/TD]
[TD]Yes/no[/TD]
[/TR]
[TR]
[TD]164001[/TD]
[TD]164005[/TD]
[TD]8000[/TD]
[TD]8100[/TD]
[TD]yes[/TD]
[TD]yes[/TD]
[TD]164002[/TD]
[TD]8090[/TD]
[TD]yes[/TD]
[/TR]
[TR]
[TD]164006[/TD]
[TD]164011[/TD]
[TD]8101[/TD]
[TD]8104[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164012[/TD]
[TD]164017[/TD]
[TD]8106[/TD]
[TD]8109[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164018[/TD]
[TD]164023[/TD]
[TD]8111[/TD]
[TD]8114[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164024[/TD]
[TD]164029[/TD]
[TD]8116[/TD]
[TD]8119[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


If I have to check for nearly 1000 combinations then I have to copy and paste each combinations 1000 times and then have to find whether its available. Is there any macro that can find the combinations from the available data.


I Have another doubt how can i attacha a file so that u can refer to it i dont find any attach b
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
All the steps below are straightforward and easy to do.

Organize the input GL and CC so that they are in the same column as the GL combination and CC combination column. This way the input values and the results will be in 1 pair of columns.

Now, copy the formulas out to the right for 2000 columns.

You can always record doing the above and then do the same programmatically for future workbooks.

hi i need a macro for the below details.. i have been using formulas to get the details but it takes lot of time pls help...


I have a file with 4 columns filled with details as listed below
[TABLE="class: cms_table"]
<tbody>[TR]
[TD]GL[/TD]
[TD]GL[/TD]
[TD]CC[/TD]
[TD]CC[/TD]
[TD]GL combination[/TD]
[TD]CC combination[/TD]
[TD]Input GL[/TD]
[TD]Input cc[/TD]
[TD]Yes/no[/TD]
[/TR]
[TR]
[TD]164001[/TD]
[TD]164005[/TD]
[TD]8000[/TD]
[TD]8100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164006[/TD]
[TD]164011[/TD]
[TD]8101[/TD]
[TD]8104[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164012[/TD]
[TD]164017[/TD]
[TD]8106[/TD]
[TD]8109[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164018[/TD]
[TD]164023[/TD]
[TD]8111[/TD]
[TD]8114[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164024[/TD]
[TD]164029[/TD]
[TD]8116[/TD]
[TD]8119[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164030[/TD]
[TD]164035[/TD]
[TD]8121[/TD]
[TD]8124[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


If I fill the INPUT GL column and INPUT CC column it should check with each combinations form gl and CC column, let me say if I give 164002 in gl and 8090 then it will check with each combinations from top to bottom if it finds in any row then it should result in yes.. please find a example given below

[TABLE="class: cms_table"]
<tbody>[TR]
[TD]GL[/TD]
[TD]GL[/TD]
[TD]CC[/TD]
[TD]CC[/TD]
[TD]GL combination[/TD]
[TD]CC combination[/TD]
[TD]Input GL[/TD]
[TD]Input cc[/TD]
[TD]Yes/no[/TD]
[/TR]
[TR]
[TD]164001[/TD]
[TD]164005[/TD]
[TD]8000[/TD]
[TD]8100[/TD]
[TD]yes[/TD]
[TD]yes[/TD]
[TD]164002[/TD]
[TD]8090[/TD]
[TD]yes[/TD]
[/TR]
[TR]
[TD]164006[/TD]
[TD]164011[/TD]
[TD]8101[/TD]
[TD]8104[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164012[/TD]
[TD]164017[/TD]
[TD]8106[/TD]
[TD]8109[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164018[/TD]
[TD]164023[/TD]
[TD]8111[/TD]
[TD]8114[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]164024[/TD]
[TD]164029[/TD]
[TD]8116[/TD]
[TD]8119[/TD]
[TD]no[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


If I have to check for nearly 1000 combinations then I have to copy and paste each combinations 1000 times and then have to find whether its available. Is there any macro that can find the combinations from the available data.


I Have another doubt how can i attacha a file so that u can refer to it i dont find any attach b
 
Upvote 0

Forum statistics

Threads
1,223,276
Messages
6,171,140
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