Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread Puttu *
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  MASS TOTUS If Outlet is MASS  Level is TOTUS,
 then Number should prefix  0010 0010 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




Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread Amresh Maurya
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  MASS TOTUS If Outlet is MASS  Level is TOTUS,
 then Number should prefix  0010 0010 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




Test Copy.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread Puttu *
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.comwrote:

 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  MASS TOTUS If Outlet is MASS  Level is TOTUS,
 then Number should prefix  0010 0010 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.


Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread Amresh Maurya
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.comwrote:

 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  MASS TOTUS If Outlet is MASS  Level is
 TOTUS, then Number should prefix  0010 0010 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 

Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread Anil Gawli
Dear Amresh kushwaha
U can use vlooup is these
=VLOOKUP(B8,H3:J8,3,0)A8

On Mon, Jul 23, 2012 at 1:52 PM, Amresh Maurya  wrote:

 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.comwrote:

 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  MASS TOTUS If Outlet is MASS  Level is
 TOTUS, then Number should prefix  0010 0010 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 

Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread Puttu *
Thanks Amresh,

I think this serve my purpose, but need one more thing, since are vary one
cell have 2 digits no. and one have 3 digit numbers and one have 4 digit
numbers in the cell, finally it should be ending with 8 digit no.  Is there
any way to put in code?

On Mon, Jul 23, 2012 at 1:52 PM, Amresh Maurya amreshkushw...@gmail.comwrote:

 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.comwrote:

 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  MASS TOTUS If Outlet is MASS  Level is
 TOTUS, then Number should prefix  0010 0010 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 

Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread Puttu *
This is how the output I am looking for each creteria. with the VBA code

If len is 3 and outlet is FOOD and Level is REGION then it should reflect
as 00200100
if len is 2 and outlet is FOOD and Level is REGION then it should reflect
as 00200010
If len is 4 and outlet is FOOD and Level is REGION then it should reflect
as 00201000
If len is 1 and outlet is FOOD and Level is REGION then it should reflect
as 0021


 number Outlet Level OUTPUT 100 FOOD REGION 00200100 10 FOOD REGION
00200010 1000 FOOD REGION 00201000 1 FOOD REGION 0021

On Mon, Jul 23, 2012 at 2:08 PM, Puttu * puttu...@gmail.com wrote:

 Thanks Amresh,

 I think this serve my purpose, but need one more thing, since are vary one
 cell have 2 digits no. and one have 3 digit numbers and one have 4 digit
 numbers in the cell, finally it should be ending with 8 digit no.  Is there
 any way to put in code?


 On Mon, Jul 23, 2012 at 1:52 PM, Amresh Maurya 
 amreshkushw...@gmail.comwrote:

 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  MASS TOTUS If Outlet is MASS 
 Level is TOTUS, then Number should prefix  0010 0010 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+ 

Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread Puttu *
Thanks Amresh, This is what i was looking. Appreciate your timely help.

Thanks again a lot :)
On Mon, Jul 23, 2012 at 3:06 PM, Amresh Maurya amreshkushw...@gmail.comwrote:

 Hi ,

 find the attached file.

 use this code.

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

 If Outlet = FOOD And Level = REGION Then

 perfix = Format(00200  numbner, )


 End If


 If Outlet = DRUG And Level = REGION Then

 perfix = Format(02200  numbner, )


 End If


 If Outlet = MASS And Level = TOTUS Then

 perfix = Format(0010  numbner, )


 End If


 If Outlet = CLUB And Level = CUSTM Then

 perfix = Format(01650  numbner, )


 End If


 If Outlet = FOOD And Level = MKT Then

 perfix = Format(003000  numbner, )


 End If


 If Outlet = LIQ And Level = CUSTM Then

 perfix = Format(08100  numbner, )

 End If



 End Function



 Regards
 Amresh




 On Mon, Jul 23, 2012 at 2:57 PM, Puttu * puttu...@gmail.com wrote:

 This is how the output I am looking for each creteria. with the VBA code

 If len is 3 and outlet is FOOD and Level is REGION then it should reflect
 as 00200100
 if len is 2 and outlet is FOOD and Level is REGION then it should reflect
 as 00200010
 If len is 4 and outlet is FOOD and Level is REGION then it should reflect
 as 00201000
 If len is 1 and outlet is FOOD and Level is REGION then it should reflect
 as 0021


  number Outlet Level OUTPUT 100 FOOD REGION 00200100 10 FOOD REGION
 00200010 1000 FOOD REGION 00201000 1 FOOD REGION 0021

  On Mon, Jul 23, 2012 at 2:08 PM, Puttu * puttu...@gmail.com wrote:

 Thanks Amresh,

 I think this serve my purpose, but need one more thing, since are vary
 one cell have 2 digits no. and one have 3 digit numbers and one have 4
 digit numbers in the cell, finally it should be ending with 8 digit no.  Is
 there any way to put in code?


 On Mon, Jul 23, 2012 at 1:52 PM, Amresh Maurya amreshkushw...@gmail.com
  wrote:

 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  MASS TOTUS If
 Outlet is MASS  Level is TOTUS, then Number should prefix  0010
 0010 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






Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread dguillett1
I would have used SELECTCASE 

Option Compare Text
Option Explicit
Sub selectcaseloopSAS()
Dim c As Range
Columns(c).NumberFormat = 0
For Each c In Range(a2:a12)
Select Case c.Offset(, 1)  c.Offset(, 2)
  Case FOOD  REGION: c.Offset(, 3) = 00200  c   
  Case FOOD  MKT: c.Offset(, 3) = 00300  c
  Case drug  region: c.Offset(, 3) = 02200  c
  Case Else
End Select
Next c
End Sub

Don Guillett
Microsoft Excel Developer
SalesAid Software
dguille...@gmail.com

From: Amresh Maurya 
Sent: Monday, July 23, 2012 4:36 AM
To: excel-macros@googlegroups.com 
Subject: Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

Hi , 

find the attached file.

use this code.

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

If Outlet = FOOD And Level = REGION Then

perfix = Format(00200  numbner, )


End If


If Outlet = DRUG And Level = REGION Then

perfix = Format(02200  numbner, )


End If


If Outlet = MASS And Level = TOTUS Then

perfix = Format(0010  numbner, )


End If


If Outlet = CLUB And Level = CUSTM Then

perfix = Format(01650  numbner, )


End If


If Outlet = FOOD And Level = MKT Then

perfix = Format(003000  numbner, )


End If


If Outlet = LIQ And Level = CUSTM Then

perfix = Format(08100  numbner, )

End If



End Function



Regards
Amresh





On Mon, Jul 23, 2012 at 2:57 PM, Puttu * puttu...@gmail.com wrote:

  This is how the output I am looking for each creteria. with the VBA code

  If len is 3 and outlet is FOOD and Level is REGION then it should reflect as 
00200100
  if len is 2 and outlet is FOOD and Level is REGION then it should reflect as 
00200010
  If len is 4 and outlet is FOOD and Level is REGION then it should reflect as 
00201000
  If len is 1 and outlet is FOOD and Level is REGION then it should reflect as 
0021


number Outlet Level OUTPUT 
100 FOOD REGION 00200100 
10 FOOD REGION 00200010 
1000 FOOD REGION 00201000 
1 FOOD REGION 0021 



  On Mon, Jul 23, 2012 at 2:08 PM, Puttu * puttu...@gmail.com wrote:

Thanks Amresh,

I think this serve my purpose, but need one more thing, since are vary one 
cell have 2 digits no. and one have 3 digit numbers and one have 4 digit 
numbers in the cell, finally it should be ending with 8 digit no.  Is there any 
way to put in code? 



On Mon, Jul 23, 2012 at 1:52 PM, Amresh Maurya amreshkushw...@gmail.com 
wrote:

  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 
 MASS TOTUS If Outlet is MASS  Level is TOTUS, then 
Number should prefix  0010 0010 
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

Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-23 Thread dguillett1
Option Compare Text
Sub selectcaseloop()
Dim c As Range
Columns(f).NumberFormat = 0
For Each c In Range(a2:a12)
Select Case c.Offset(, 1)  c.Offset(, 2)
Case FOOD  REGION: c.Offset(, 5) = 00200  c
Case FOOD  MKT: c.Offset(, 5) = 00300  c
Case drug  region: c.Offset(, 5) = 02200  c
Case Else
End Select
Next
End Sub

Don Guillett
Microsoft Excel Developer
SalesAid Software
dguille...@gmail.com

From: Puttu * 
Sent: Saturday, July 21, 2012 11:53 AM
To: excel-macros@googlegroups.com 
Subject: Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

Thanks Don, but i need a macro for this, because i have too many sheets in the 
same format. Macro will help me a lot to save my time


On Sat, Jul 21, 2012 at 9:53 PM, dguillett1 dguille...@gmail.com wrote:

  Modify to suit

  Don Guillett
  Microsoft Excel Developer
  SalesAid Software
  dguille...@gmail.com

  From: Puttu * 
  Sent: Saturday, July 21, 2012 8:45 AM
  To: MS EXCEL AND VBA MACROS 
  Subject: $$Excel-Macros$$ Required Prefix Macro for the numbers

  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 
 MASS TOTUS If Outlet is MASS  Level is TOTUS, then Number 
should prefix  0010 0010 
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 
mailto:excel-macros%2bunsubscr...@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 
mailto:excel-macros%2bunsubscr...@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

Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-22 Thread Puttu *
Any update on the below help?

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  MASS TOTUS If Outlet is MASS  Level is TOTUS,
 then Number should prefix  0010 0010 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




Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-21 Thread dguillett1
Modify to suit

Don Guillett
Microsoft Excel Developer
SalesAid Software
dguille...@gmail.com

From: Puttu * 
Sent: Saturday, July 21, 2012 8:45 AM
To: MS EXCEL AND VBA MACROS 
Subject: $$Excel-Macros$$ Required Prefix Macro for the numbers

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 
   MASS TOTUS If Outlet is MASS  Level is TOTUS, then Number should 
prefix  0010 0010 
  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
 
 

-- 
-- 
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




Required Prefix Macro for numbers.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-21 Thread Puttu *
Thanks Don, but i need a macro for this, because i have too many sheets in
the same format. Macro will help me a lot to save my time

On Sat, Jul 21, 2012 at 9:53 PM, dguillett1 dguille...@gmail.com wrote:

   Modify to suit

 Don Guillett
 Microsoft Excel Developer
 SalesAid Software
 dguille...@gmail.com

  *From:* Puttu * puttu...@gmail.com
 *Sent:* Saturday, July 21, 2012 8:45 AM
 *To:* MS EXCEL AND VBA MACROS excel-macros@googlegroups.com
 *Subject:* $$Excel-Macros$$ Required Prefix Macro for the numbers

  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  MASS TOTUS If Outlet is MASS  Level is TOTUS,
 then Number should prefix  0010 0010 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



 --
 --
 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




Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-21 Thread dguillett1
It’s easy enough to use a macro to apply the vlookup formula, assuming you have 
the table set up or you could use a SELECTCASE macro. 

Don Guillett
Microsoft Excel Developer
SalesAid Software
dguille...@gmail.com

From: Puttu * 
Sent: Saturday, July 21, 2012 11:53 AM
To: excel-macros@googlegroups.com 
Subject: Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

Thanks Don, but i need a macro for this, because i have too many sheets in the 
same format. Macro will help me a lot to save my time


On Sat, Jul 21, 2012 at 9:53 PM, dguillett1 dguille...@gmail.com wrote:

  Modify to suit

  Don Guillett
  Microsoft Excel Developer
  SalesAid Software
  dguille...@gmail.com

  From: Puttu * 
  Sent: Saturday, July 21, 2012 8:45 AM
  To: MS EXCEL AND VBA MACROS 
  Subject: $$Excel-Macros$$ Required Prefix Macro for the numbers

  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 
 MASS TOTUS If Outlet is MASS  Level is TOTUS, then Number 
should prefix  0010 0010 
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 
mailto:excel-macros%2bunsubscr...@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 
mailto:excel-macros%2bunsubscr...@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

Re: $$Excel-Macros$$ Required Prefix Macro for the numbers

2012-07-21 Thread Puttu *
Please help me on this experts

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  MASS TOTUS If Outlet is MASS  Level is TOTUS,
 then Number should prefix  0010 0010 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