Hi ,

I have attached a function for you kindly add it in your add-ins and use.

Function perfix(Outlet As String, Level As String, numbner As Integer)

If Outlet = "FOOD" And Level = "REGION" Then

perfix = "00200" & numbner

End If


If Outlet = "DRUG" And Level = "REGION" Then

perfix = "02200" & numbner


End If


If Outlet = "MASS" And Level = "TOTUS" Then

perfix = "0010" & numbner

End If


If Outlet = "CLUB" And Level = "CUSTM" Then

perfix = "01650" & numbner


End If


If Outlet = "FOOD" And Level = "MKT" Then

perfix = "003000" & numbner


End If


If Outlet = "LIQ" And Level = "CUSTM" Then

perfix = "008100" & numbner


End If



End Function


Regards
Amresh


On Mon, Jul 23, 2012 at 1:18 PM, Puttu * <puttu...@gmail.com> wrote:

> Thanks Amresh, I need to run this multiple sheets, can i have this in
> macro. Which is going to help me a lot.
>
> Appreciate your help
>
>
> On Mon, Jul 23, 2012 at 1:10 PM, Amresh Maurya 
> <amreshkushw...@gmail.com>wrote:
>
>> Hi,
>> Kindly find the attached solutions.
>>
>> Regards
>> Amresh
>>
>>
>> On Mon, Jul 23, 2012 at 12:40 PM, Puttu * <puttu...@gmail.com> wrote:
>>
>>> Experts please help me on this code.
>>>
>>> On Sat, Jul 21, 2012 at 7:15 PM, Puttu * <puttu...@gmail.com> wrote:
>>>
>>>> Hi Experts,
>>>>
>>>> Please help on below macro need a macro to prefix on the below numbers.
>>>> I just took one one example for refeence, but i have huge no. like this.
>>>> Your help is much appreciated
>>>>
>>>>       *Number* *Outlet* *Level* *Code should some thing like this* *This
>>>> is how I am looking for output*  100 FOOD REGION If Outlet is "Food" &
>>>> Level is "Region, then Number should prefix  00200 00200100 150 DRUG
>>>> REGION If Outlet is "DRUG" & Level is "Region, then Number should
>>>> prefix  02200 02200150 9999 MASS TOTUS If Outlet is "MASS" & Level is
>>>> "TOTUS, then Number should prefix  0010 00109999 300 CLUB CUSTM If
>>>> Outlet is "CLUB" & Level is "CUSTM, then Number should prefix  01650
>>>> 01650300 14 FOOD MKT If Outlet is "FOOD" & Level is "MKT, then Number
>>>> should prefix  003000 00300014 400 LIQ CUSTM If Outlet is "LIQ" &
>>>> Level is "CUSTM, then Number should prefix  008100 08150400
>>>>
>>>> --
>>>> Putta
>>>>
>>>> --
>>>> --
>>>> FORUM RULES (986+ members already BANNED for violation)
>>>>
>>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>>>> will not get quick attention or may not be answered.
>>>>
>>>> 2) Don't post a question in the thread of another member.
>>>>
>>>> 3) Don't post questions regarding breaking or bypassing any security
>>>> measure.
>>>>
>>>> 4) Acknowledge the responses you receive, good or bad.
>>>>
>>>> 5) Cross-promotion of, or links to, forums competitive to this forum in
>>>> signatures are prohibited.
>>>>
>>>> NOTE : Don't ever post personal or confidential data in a workbook.
>>>> Forum owners and members are not responsible for any loss.
>>>>
>>>>
>>>> ------------------------------------------------------------------------------------------------------
>>>> To post to this group, send email to excel-macros@googlegroups.com
>>>>
>>>> To unsubscribe, send a blank email to
>>>> excel-macros+unsubscr...@googlegroups.com
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Putta
>>>
>>> --
>>> --
>>> FORUM RULES (986+ members already BANNED for violation)
>>>
>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>>> will not get quick attention or may not be answered.
>>>
>>> 2) Don't post a question in the thread of another member.
>>>
>>> 3) Don't post questions regarding breaking or bypassing any security
>>> measure.
>>>
>>> 4) Acknowledge the responses you receive, good or bad.
>>>
>>> 5) Cross-promotion of, or links to, forums competitive to this forum in
>>> signatures are prohibited.
>>>
>>> NOTE : Don't ever post personal or confidential data in a workbook.
>>> Forum owners and members are not responsible for any loss.
>>>
>>>
>>> ------------------------------------------------------------------------------------------------------
>>> To post to this group, send email to excel-macros@googlegroups.com
>>>
>>> To unsubscribe, send a blank email to
>>> excel-macros+unsubscr...@googlegroups.com
>>>
>>>
>>>
>>
>>  --
>> --
>> FORUM RULES (986+ members already BANNED for violation)
>>
>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>> will not get quick attention or may not be answered.
>>
>> 2) Don't post a question in the thread of another member.
>>
>> 3) Don't post questions regarding breaking or bypassing any security
>> measure.
>>
>> 4) Acknowledge the responses you receive, good or bad.
>>
>> 5) Cross-promotion of, or links to, forums competitive to this forum in
>> signatures are prohibited.
>>
>> NOTE : Don't ever post personal or confidential data in a workbook. Forum
>> owners and members are not responsible for any loss.
>>
>>
>> ------------------------------------------------------------------------------------------------------
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> To unsubscribe, send a blank email to
>> excel-macros+unsubscr...@googlegroups.com
>>
>>
>>
>
>
>
> --
> Putta
>
> --
> --
> FORUM RULES (986+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>
> To unsubscribe, send a blank email to
> excel-macros+unsubscr...@googlegroups.com
>
>
>

-- 
-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com


Attachment: Test Copy1.xlsm
Description: Binary data

Reply via email to