PC Review


Reply
Thread Tools Rate Thread

Automatically select cells based on results size

 
 
heverp@gmail.com
Guest
Posts: n/a
 
      1st Jun 2007
Hi,

I am using a VBA addin to get data from a database. The user selects a
cell then enters a function name with parameters in the formula bar.
This retrieves the data from the database based on what was specified.

The problem I'm having is that the user must know beforehand what the
size of the results will be or at least guess at it. This requires the
user to select a large range of cells and run the formula over the
entire range.

The ideal solution would be for the user to select a single cell, run
the query and the addin would then extend the range to accommodate the
result set.

So far I have tried to achieve this and failed. I have looked around a
lot online and found no solution to this. Can anyone help me out here,
any solution to this would be very much appreciated.

Thanks,

-Pete

 
Reply With Quote
 
 
 
 
Pete
Guest
Posts: n/a
 
      15th Jun 2007
On 1 Jun, 12:26, hev...@gmail.com wrote:
> Hi,
>
> I am using a VBA addin to get data from a database. The user selects a
> cell then enters a function name with parameters in the formula bar.
> This retrieves the data from the databasebasedon what was specified.
>
> The problem I'm having is that the user must know beforehand what thesizeof theresultswill be or at least guess at it. This requires the
> user toselecta large range ofcellsand run the formula over the
> entire range.
>
> The ideal solution would be for the user toselecta single cell, run
> the query and the addin would then extend the range to accommodate the
> result set.
>
> So far I have tried to achieve this and failed. I have looked around a
> lot online and found no solution to this. Can anyone help me out here,
> any solution to this would be very much appreciated.
>
> Thanks,
>
> -Pete


In case anyone is interested in this, here is the response I got from
Microsoft (handy having a dedicated support contact!):

Unfortunately I don't think this is possible. I'm not an expert on
user defined functions, but I believe one of their limitations is that
they cannot place values in cells other than the cell, or range, that
contains the formula. However, you can do this with a macro.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with displaying results in a form based on a Combo box select Lena Microsoft Access Form Coding 0 1st Dec 2008 06:58 PM
Select Reccords based on Expression Results Marktheshark Microsoft Access Queries 3 3rd Sep 2008 03:14 PM
How to automatically update data in form based on results of entry BLW Microsoft Access Form Coding 10 24th Jul 2008 09:40 PM
Formula to select cells based on text in other cells =?Utf-8?B?UGhyb250aXM=?= Microsoft Excel Discussion 4 25th Nov 2006 06:16 PM
Formula to color cells based on results RickyDee Microsoft Excel Worksheet Functions 1 20th Jan 2004 03:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:26 PM.