Using cell input as range value
Using cell input as range value
Using cell input as range value
Using cell input as range value
Using cell input as range value
Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value
Using cell input as range value Using cell input as range value
Using cell input as range value
Go Back  Xtreme Visual Basic Talk > > > > Using cell input as range value


Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2014, 06:31 PM
snappleapple snappleapple is offline
Newcomer
 
Join Date: Sep 2014
Posts: 1
Default Using cell input as range value


I want to make a dynamic range selection that is dependant on the date. So I had a search function find the cell address and output it to another cell. I want to read that cell's input to be the new range to be selected

For example the new range would be A15 whose address is stored in A2. So I want to read A2's input and use it as my new range.

Sub test()

Dim s As String

s = Range("A2").Value

Range("s:A15").Select
Selection.Copy
Range("C1").Select
ActiveSheet.Paste
End Sub

I keep getting compilation errors so any help on this matter would be appreciated.
Reply With Quote
  #2  
Old 11-10-2014, 10:26 AM
EdHoeffner EdHoeffner is offline
Newcomer
 
Join Date: Nov 2007
Posts: 11
Default

This help?

Public Sub junk()
Dim s As String
s = ActiveSheet.Cells(1, 1).Value
Range(s).Select
End Sub

cells(1,1) contains "A15" without the quotes
Reply With Quote
Reply

Tags
cells, range, visual basic


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Using cell input as range value
Using cell input as range value
Using cell input as range value Using cell input as range value
Using cell input as range value
Using cell input as range value
Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value Using cell input as range value
Using cell input as range value
Using cell input as range value
 
Using cell input as range value
Using cell input as range value
 
-->