try this, Sub namerange() Dim rngRange As Range Dim rngCell As Range Set rngRange = Application.InputBox("select range", , , , , , , 8) For Each rngCell In rngRange.Columns(1).Cells ThisWorkbook.Names.Add rngCell, rngCell.Offset(, 1).Formula Next
End Sub On Thu, Mar 6, 2014 at 11:24 PM, Prafull Jadhav <prafulltjad...@gmail.com>wrote: > Dear All, > Good Afternoon, > > I have one query . > Can we change the Name Range with help of VBA > for example below are the name range in my excel file & I have to extend > the range by 20000...i.e 85000. > if it is possible ..Kindly provide the code for the same. > > Abhijit_ =Details!$AJ$1:$AJ$65000 Bucket_ =Details!$U$1:$U$65000 Cdate > =Details!$AB$1:$AB$65000 City_ =Details!$AF$1:$AF$65000 Code_ > =Details!$W$1:$W$65000 Cweek =Details!$AD$1:$AD$65000 date_ > =Details!$AB$1:$AB$65000 Edate =Details!$AC$1:$AC$65000 Eweek > =Details!$AE$1:$AE$65000 Filter_ =Details!$S$1:$S$65000 Group > =Vlookup!$B$2:$D$169 jo_ =Details!#REF! LOB_ =Details!$E$1:$E$65000 > mode_ =Details!$B$1:$B$65000 Month_ =Details!$AH$1:$AH$65000 Oct_ > =Details!$AG$1:$AG$65000 Owner_ =Details!$Y$1:$Y$65000 Ownerlob_ > =Details!$Z$1:$Z$65000 Pornima_ =Details!$F$1:$F$65000 Reso_ > =Details!$R$1:$R$65000 Resp_ =Details!$Q$1:$Q$65000 RLIWeek > =Details!$AK$1:$AK$65000 SDM =Vlookup!$T$2:$U$46 Severity_ > =Details!$M$1:$M$65000 Status =Vlookup!$L$2:$M$53 Status_ > =Details!$AA$1:$AA$65000 Status_Oct =Details!$AI$1:$AI$65000 Week_ > =Vlookup!$X$2:$Z$40 Zone =Vlookup!$F$2:$J$15000 Zone_ > =Details!$X$1:$X$65000 > > Regards, > Prafull Jadhav > 9920553518 > > -- > 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.