=INT((B2-150)/10)+1001
Simpler than the MOD version, and less CPU intensive for those times when it needs to be calculated millions of times :) Sorry for the emailing before thinking! Asa From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Asa Rossoff Sent: Monday, October 24, 2011 8:16 AM To: 'Asa Rossoff'; excel-macros@googlegroups.com Subject: RE: $$Excel-Macros$$ Help needed..? I agree with Sam that your requirement isn't 100% clear. He gave a solution for one interpretation. I'll flesh out mine. =IFERROR(OFFSET(A2,-10,0)+1,1001) =IF(ROW(A2)>11,OFFSET(A2,-10,0)+1,1001) As I said will give you a sequential number that changes every 10 rows, starting with 1001 in A2. If you need to be able to sort your table and have the numbers stay correct, you need a different way to calcualte the book #. This formula calculates the correct book # based on the Receipt #: =(B2-150-MOD(B2-150,10))/10+1001 Change 150 as needed for the starting Receipt #, and 1001 as needed for the starting Book #. You can sort the table with this version, and you can having missing receipts, and the calculation will not be fooled. Maybe one of these meets your needs. Asa From: Asa Rossoff [mailto:a...@lovetour.info] Sent: Monday, October 24, 2011 7:54 AM To: 'excel-macros@googlegroups.com' Subject: RE: $$Excel-Macros$$ Help needed..? For book #s starting at 1001 and changing every 10 rows; Put in cell A2: =IFERROR(OFFSET(A2,-10,0)+1,1001) In case of Excel version prior to 2003, which doesn't support IFERROR, use: =IF(ROW(A2)>11,OFFSET(A2,-10,0)+1,1001) Change default book # in formula as desired. Copy down. Asa From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of sriram ji Sent: Monday, October 24, 2011 6:35 AM To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ Help needed..? Dear All, Kindly find the attached file, and provide formula for this.... Thanks & Regards, Sriram.G Chennai. -- ---------------------------------------------------------------------------- ------ Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------- ------ Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel