LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default Named Range Macro

My code is as follows:

a = InputBox("Enter sheet name exactly as labeled:")
Range("E6").Select
ActiveCell = a
Sheets(a).Select

If Err.Number = 9 Then
MsgBox "Sorry but your desired sheet does not exist in this workbook,
please verify sheet name and run analysis again.", vbExclamation, "Error!"
End If

Range("EF25").Select
ActiveWorkbook.Names.Add Name:="defective_rate",
RefersToR1C1:="=Vendor!R25C136"


----The only change I need to make is instead of declaring the named range
to RefersToR1C1:="=Vendor!R25C136, I would like the named range to refer to
R25C136 on the sheet that the user indicates (listed in the code as a)- how
do I do this???? Thanks!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
List Box - For Input Range can I use named range in another workbo dim Excel Worksheet Functions 2 January 3rd 08 06:10 PM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
automatic range - named range give me circular reference... George Thorogood Excel Discussion (Misc queries) 0 February 22nd 07 07:53 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM


All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"