Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Add to Dynamic Named Range

Hi all. I have a dynamic named range in Sheet1 A2:A100. I would like
to call a macro to pop an input box asking for a new value, and then
write that value in the next available cell in my named range. Any
idea how I can accomplish this?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Add to Dynamic Named Range

You don't need a named range for this

Sub msgboxvaluetonextrowSAS()
Dim ans As String
ans = InputBox("Enter Value", vbOKCancel)
Cells(2, "a").End(xlDown).Offset(1) = ans
End Sub


On Jan 27, 1:49*pm, Steve wrote:
Hi all. *I have a dynamic named range in Sheet1 A2:A100. *I would like
to call a macro to pop an input box asking for a new value, and then
write that value in the next available cell in my named range. *Any
idea how I can accomplish this?

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Add to Dynamic Named Range

Thanks Don!

One follow up question - is there a way to NOT allow the user to enter
the words "request" or "issue" in the string, displaying an error if
they do?

On Jan 27, 1:21*pm, Don Guillett wrote:
You don't need a named range for this

Sub msgboxvaluetonextrowSAS()
Dim ans As String
ans = InputBox("Enter Value", vbOKCancel)
Cells(2, "a").End(xlDown).Offset(1) = ans
End Sub

On Jan 27, 1:49*pm, Steve wrote:



Hi all. *I have a dynamic named range in Sheet1 A2:A100. *I would like
to call a macro to pop an input box asking for a new value, and then
write that value in the next available cell in my named range. *Any
idea how I can accomplish this?


Thanks!- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Add to Dynamic Named Range

On Jan 27, 3:08*pm, Steve wrote:
Thanks Don!

One follow up question - is there a way to NOT allow the user to enter
the words "request" or "issue" in the string, displaying an error if
they do?

On Jan 27, 1:21*pm, Don Guillett wrote:







You don't need a named range for this


Sub msgboxvaluetonextrowSAS()
Dim ans As String
ans = InputBox("Enter Value", vbOKCancel)
Cells(2, "a").End(xlDown).Offset(1) = ans
End Sub


On Jan 27, 1:49*pm, Steve wrote:


Hi all. *I have a dynamic named range in Sheet1 A2:A100. *I would like
to call a macro to pop an input box asking for a new value, and then
write that value in the next available cell in my named range. *Any
idea how I can accomplish this?


Thanks!- Hide quoted text -


- Show quoted text -

Sub msgboxvaluetonextrowSAS()
Dim ans As String
ans = InputBox("Enter Value", vbOKCancel)
If UCase(ans) = "REQUEST" Or UCase(ans) = "ISSUE" Then
MsgBox "Not allowed"
Else
Cells(1, "a").End(xlDown).Offset(1) = ans
End If
End Sub
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Add to Dynamic Named Range

Thanks Don! Is there a way to use a "contains" function as opposed to
an equal to? For example, I also need to prevent the user from
entering "Compliance Request".

Thanks!

On Jan 27, 2:17*pm, Don Guillett wrote:
On Jan 27, 3:08*pm, Steve wrote:



Thanks Don!


One follow up question - is there a way to NOT allow the user to enter
the words "request" or "issue" in the string, displaying an error if
they do?


On Jan 27, 1:21*pm, Don Guillett wrote:


You don't need a named range for this


Sub msgboxvaluetonextrowSAS()
Dim ans As String
ans = InputBox("Enter Value", vbOKCancel)
Cells(2, "a").End(xlDown).Offset(1) = ans
End Sub


On Jan 27, 1:49*pm, Steve wrote:


Hi all. *I have a dynamic named range in Sheet1 A2:A100. *I would like
to call a macro to pop an input box asking for a new value, and then
write that value in the next available cell in my named range. *Any
idea how I can accomplish this?


Thanks!- Hide quoted text -


- Show quoted text -


Sub msgboxvaluetonextrowSAS()
Dim ans As String
ans = InputBox("Enter Value", vbOKCancel)
If UCase(ans) = "REQUEST" Or UCase(ans) = "ISSUE" Then
MsgBox "Not allowed"
Else
Cells(1, "a").End(xlDown).Offset(1) = ans
End If
End Sub- Hide quoted text -

- Show quoted text -




Reply
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
Dynamic Named Range dhstein Excel Discussion (Misc queries) 4 October 11th 09 11:15 PM
Dynamic Named Range Madiya Excel Programming 7 August 14th 06 02:19 PM
Dynamic Named Range bountifulgrace Charts and Charting in Excel 1 April 6th 06 08:39 PM
getting the absolute range address from a dynamic named range junoon Excel Programming 2 March 21st 06 01:29 PM
dynamic named range Steph[_3_] Excel Programming 3 March 22nd 05 02:56 PM


All times are GMT +1. The time now is 09:44 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"