LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting a data range using a variable


Hi there...

I'm having a little trouble as I have never programmed excel but have
studied programming so I know what i'm doing but have no idea how to go
about it sometimes :P

I have not been able to track down a tutorial for my latest problem...

What I have so far is a combo box to select an employee name and a
button to sort the database so I only have rows containing that
employee name.

So in essence I am at the moment left with a set of rows looking like
for example:

1
56
57
58
59
1000

and I want to populate a list box with the contents of column E.

ie E56-E59

but of course it is not always 56-59 it could be 10-13.

Can I approach this along these lines?

ListBox1.RowSource = "'Worksheet1'$E$Variable$E$Variable2"

*edit*
Forgot my question :P

If so what syntax do i use with the variables so it knows to look for
$E$56 instead of $E$Variable.

*edit*

Or should I go about it completely differently? :)

Thoughs and advice appreciated.

D


--
Alariel
------------------------------------------------------------------------
Alariel's Profile: http://www.excelforum.com/member.php...o&userid=37644
View this thread: http://www.excelforum.com/showthread...hreadid=572560

 
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
Selecting a variable range Bill Excel Programming 4 August 16th 06 05:42 PM
selecting Variable range katmando[_10_] Excel Programming 4 May 18th 06 09:51 AM
selecting a variable row range Dan Excel Programming 2 March 5th 05 12:03 PM
Selecting a variable Range Brett[_6_] Excel Programming 1 September 9th 04 02:46 AM
Selecting a Range Using a Variable Bob J. Excel Programming 4 September 14th 03 09:24 PM


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