HI
Sometimes using VBA is not a good approach to accomplish the task, when we can do the same by excel native formulas, So the best is to use formula when it can be easily done. J Regards Rajan verma +91 7838100659 [IM-Gtalk] From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Excel_Lover Sent: 08 May 2012 12:57 To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ To create a serial number based on some conditions using macro. Dear Rajan, Thanks for your effort, I was seeking for a macro solution for this. How is it possible, please let me know. Thanks, On Mon, May 7, 2012 at 8:13 PM, Rajan_Verma <rajanverma1...@gmail.com> wrote: Hi Please find the attached File =IF(OR(COUNTIF($C$1:C2,C2)>=5,E3<>E2),C2+1,C2) Regards Rajan verma +91 7838100659 [IM-Gtalk] From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Excel_Lover Sent: 07 May 2012 2:50 To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ To create a serial number based on some conditions using macro. Dear All, Appreciate an help to write a macro to create a request number as per the below condition. for each name on the same date should be a same request number, but should not be repeated more than five times. Important: If the date column is blank and Name column having data macro should generate code as shown in the sample. Please find the below mentioned sample and attached sheet for your reference, in which hilghlighted in yellow is the required result. Req. No. Name Date 1001 FDFG 1-May-12 1001 DFDF 1-May-12 1001 GARS 1-May-12 1001 FGF 1-May-12 1001 DFGF 1-May-12 1002 SDESE 1-May-12 1003 SDD 2-May-12 1003 SDDDD 2-May-12 1003 SDDFFFFFF 2-May-12 1004 SDDDD 1004 SDFDFD 1004 SDFDFD 1004 SFDSFDS 1004 SDFDSF 1005 DSFDRRSR 1005 SFSRRRRR 1005 SFEWEETT 1005 DRERWEE 1005 SEREWTTTBH Thanks in advance for your valuable helps. -- 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 -- 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 -- 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 -- 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