Hi , thanks for your reply.
u will not believe it but i used the same code on test file and its working fine. so i am not sure if anything is wrong with the expansion code. 1 more thing i jus remembered. when the range is expanded and wen i used select range it select right range BUT when i press F3 and do Paste Link what i see is it shows the reference of OLD range (i.e. =Sheet1!$C$2:$C$20 instead of 30 but Column A shows reference to 30). this is happening for few ranges. i dont understand this " Try changing the order or refresh > (Calculate) the sheet. " i cannot share file coz its in the office pc i dont have it n i cannot hav it at home :(. ----- Original Message ---- > From: Dilip Pandey <dilipan...@gmail.com> > To: excel-macros@googlegroups.com > Cc: arsfan2...@yahoo.co.in > Sent: Sat, 9 July, 2011 5:55:10 PM > Subject: Re: $$Excel-Macros$$ Strange Issue with Macro > > Hi Hanumant > > It is interesting.. > I am assuming that code first changes the range for the name and then > the same is getting used. Try changing the order or refresh > (Calculate) the sheet. > If possible, share the test file. > > Best Regards, > DILIPandey > > On 7/9/11, hanumant shinde <arsfan2...@yahoo.co.in> wrote: > > Hi friends, > > > > i have a file in which there are 2 sheets. sheet A and B. i am giving name > > ranges in sheet B as below. > > > > > > A1:A20 - "Range1" > > B1:B20 - "Range2" > > C1:C20 - "Range3" > > D1:D20 - "Range4" > > these name ranges are used in Sheer A.for data validation > > programatically i am increasing these ranges by 10 rows > > > > A1:A30 - "Range1" > > B1:B30 - "Range2" > > C1:C30 - "Range3" > > D1:D30 - "Range4" > > > > after increasing the ranges if i do Range("Range1").Select for all ranges > > then > > proper range is getting selected i.e. from 1 to 30. BUT when i used the same > > range in data validation then some of the ranges are using OLD values i.e. > > lets > > say for data validation ranges used are like below > > > > A1:A30 - "Range1" - Right > > B1:B30 - "Range2" - Right > > C1:C20 - "Range3" - Wrong > > D1:D20 - "Range4" - Wrong > > > > can anybody please tell me why that would happen. > > this is very strange issue i saw my code is getting executed for increasing > > the > > range and its working fine. but still i m facing his issue. ANY help would > > help > > me a lot. > > > > thanks > > > > -- > > >---------------------------------------------------------------------------------- > > > 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 > > > > > -- > Thanks & Regards, > > DILIP KUMAR PANDEY, mvp > MBA,B.Com(Hons),BCA > Mobile: +91 9810929744 > dilipan...@gmail.com > dilipan...@yahoo.com > New Delhi - 62, India > > -- >---------------------------------------------------------------------------------- >- > 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