this is using mod function... Sub SelectRows3X_2() Dim r As Range Dim c As Range, rng As Range, lRng As Range Set r = Cells(1, 1) Set lRng = Range("A" & Rows.Count).End(xlUp) Set rng = Range(r.Address, lRng.Address) 'Debug.Print rng.Address For Each c In rng If c.Row Mod 3 = 1 Then Set r = Union(r, Cells(c.Row, 1)) 'Debug.Print r.Address End If Next r.EntireRow.Select End Sub
Cheers!! +++++ *I did not do this for you. God is here working through me for you.* On Tue, Nov 25, 2014 at 2:20 PM, Mandeep Baluja <rockerna...@gmail.com> wrote: > Vabz you were absolutely correct. One thing i appreciate you can easily > understand the point of view of the query. > > On Tuesday, November 25, 2014 1:49:32 PM UTC+5:30, Vabz wrote: >> >> I didnt get you?, do you want it without help of code? >> >> +++++ >> *I did not do this for you. God is here working through me for you.* >> >> On Tue, Nov 25, 2014 at 12:51 PM, Mandeep Baluja <rocke...@gmail.com> >> wrote: >> >>> I just want to know whether it's is possible with the help of code or >>> not. I can achieve the same with the help of helper column using a mod >>> function. >>> >>> On Monday, November 24, 2014 5:05:14 PM UTC+5:30, Mandeep Baluja wrote: >>>> >>>> Dear All, >>>> >>>> I hope you have a correct idea for my question I am asking to select >>>> rows in data with the help of loop. Please note that what i want is to run >>>> a loop select a row move next and *keep the previous row selected too*. >>>> I need a efficient code for this. >>>> >>>> >>>> Regards, >>>> Mandeep Baluja. >>>> >>>> -- >>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>> https://www.facebook.com/discussexcel >>> >>> FORUM RULES >>> >>> 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) Jobs posting is not allowed. >>> 6) Sharing copyrighted material and their links is not allowed. >>> >>> NOTE : Don't ever post confidential data in a workbook. Forum owners and >>> members are not responsible for any loss. >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "MS EXCEL AND VBA MACROS" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to excel-macros...@googlegroups.com. >>> To post to this group, send email to excel-...@googlegroups.com. >>> Visit this group at http://groups.google.com/group/excel-macros. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 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) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at http://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 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) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.