?
Solved

Excel Formula Creation

Posted on 2006-07-14
9
Medium Priority
?
537 Views
Last Modified: 2012-06-21
I have an issue in Excel. Here is what i am trying to do, is this possible?

In a control I have a selection formula something like =$A$1:$A$500...so now I am limiting the "lookup" to 500 values. What happens if there is 501?

So here is my question...

Can I create a formula that makes that 500 = to a cell value, for instance: =$A$1:$A$(X) Where X would be equal to a cell value, so I can make this lookup in the control dynamic? I want X = the cell value of B1.

Is this possible??

Thanks.
0
Comment
Question by:alucarelli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 17111184
Hi alucarelli,
----------

not sure if this is a possibility for you but you can use dynamically sizing named ranges
http://www.beyondtechnology.com/geeks007.shtml

----------
bruintje
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 17111185
Hi alucarelli,

Try:

You can use INDIRECT for that.  This example uses INDIRECT to set the lookup range for VLOOKUP:

=VLOOKUP(C1,INDIRECT("A1:A"&B1),1,FALSE)

Regards,

Patrick
0
 

Author Comment

by:alucarelli
ID: 17111232
Patrick,
Thanks for you qucik response. But that still didn't work. Can I use the "INDIRECT" in a control range? We need the control, not a VLOOKUP....

Here is the formula we are using: Where data is page2...

INDIRECT("Data!B2:Data!B"&A15)

Where A15 stores an #value...

TIA.
Tony
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 17111331
Tony,

I am not sure what you mean by control range.  Can you post an example workbook?  You can upload a sample to
your own site, or use:

http://www.ee-stuff.com/

Regards,

Patrick
0
 

Author Comment

by:alucarelli
ID: 17111411
Patrick-

I uploaded the file.

If you look at the file you will see two pages.

Ratings Questions & Data
The data page is loaded via VB and it will populate a value in cell AX1 (on the data page) with a numeric value (the number of rows of data).

On the Ratings Question page there is a control, which we do a lookup to the "Orders" on the Data Page. If you look at the Format Control properties the "Input Range" is set to Data!$B$2:$B$500 we would like the 500 to be dynamic.

Again Thanks.
Tony
0
 

Author Comment

by:alucarelli
ID: 17111429


PS: I used EE-Stuff to upload the file.
0
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 1000 total points
ID: 17111505
alucarelli,

OK, got it.

1) Define a new name, Orders, with Refers To:
=Data!$B$2:INDEX(Data!$B:$B,COUNTA(Data!$B:$B),1)

2) Make the source range for the dropdown control Orders.

Regards,

Patrick
0
 

Author Comment

by:alucarelli
ID: 17111621
Awesome...worked like a charm!

Thanks very much for the help and the quick response.

Tony
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 17112089
Tony,

Glad to help.

Regards,

Patrick
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question