PC Review


Reply
Thread Tools Rate Thread

creating a user defined function - question on input method

 
 
Ryan
Guest
Posts: n/a
 
      31st May 2007
background:
i am creating a function that is dependent on a few different
variables. temperature, physical component, weight percent.

problem:
i would like the user to be able to type = on a cell and select my
function then click on a temperature OR range of temperatures,
highlight a list of components, and highlight the corresponding weight
percents) and have the function spit out the data via various
different function calls and eventually have that data go into charts
w/ a physical property on the Y axis and temperature on the X axis.

How do I let the user enter one value or a range of values and still
handle it?
How do i bring in multiple cells w/ strings and use a case statement
to step through each cell?
How can I ensure that the weight percent stays in the same order as
the name of component so i can ensure the equations will handle it
appropriately?

I am very new to VB and VBA but i'm learning as i'm going - any
suggestions on ideas to get me started on this?

So far i have a module to contain coefficients, a class to handle the
stream itself and 2 other classes to handle an organic solution
scenario or an aqueous solution scenario.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      31st May 2007
You are going to run into a problem in that a User Defined Function can only
return a value to the cell it is in. It can not create graphs or modify cell
formats or modify the value of cells other than the one it is in... just
return a value to the cell that it is in... A function called from within
code can do all of these things but a UDF can not.
--
HTH...

Jim Thomlinson


"Ryan" wrote:

> background:
> i am creating a function that is dependent on a few different
> variables. temperature, physical component, weight percent.
>
> problem:
> i would like the user to be able to type = on a cell and select my
> function then click on a temperature OR range of temperatures,
> highlight a list of components, and highlight the corresponding weight
> percents) and have the function spit out the data via various
> different function calls and eventually have that data go into charts
> w/ a physical property on the Y axis and temperature on the X axis.
>
> How do I let the user enter one value or a range of values and still
> handle it?
> How do i bring in multiple cells w/ strings and use a case statement
> to step through each cell?
> How can I ensure that the weight percent stays in the same order as
> the name of component so i can ensure the equations will handle it
> appropriately?
>
> I am very new to VB and VBA but i'm learning as i'm going - any
> suggestions on ideas to get me started on this?
>
> So far i have a module to contain coefficients, a class to handle the
> stream itself and 2 other classes to handle an organic solution
> scenario or an aqueous solution scenario.
>
>

 
Reply With Quote
 
Ryan
Guest
Posts: n/a
 
      31st May 2007
On May 31, 3:35 pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com> wrote:
> You are going to run into a problem in that a User Defined Function can only
> return a value to the cell it is in. It can not create graphs or modify cell
> formats or modify the value of cells other than the one it is in... just
> return a value to the cell that it is in... A function called from within
> code can do all of these things but a UDF can not.
> --
> HTH...
>
> Jim Thomlinson
>
> "Ryan" wrote:
> > background:
> > i am creating a function that is dependent on a few different
> > variables. temperature, physical component, weight percent.

>
> > problem:
> > i would like the user to be able to type = on a cell and select my
> > function then click on a temperature OR range of temperatures,
> > highlight a list of components, and highlight the corresponding weight
> > percents) and have the function spit out the data via various
> > different function calls and eventually have that data go into charts
> > w/ a physical property on the Y axis and temperature on the X axis.

>
> > How do I let the user enter one value or a range of values and still
> > handle it?
> > How do i bring in multiple cells w/ strings and use a case statement
> > to step through each cell?
> > How can I ensure that the weight percent stays in the same order as
> > the name of component so i can ensure the equations will handle it
> > appropriately?

>
> > I am very new to VB and VBA but i'm learning as i'm going - any
> > suggestions on ideas to get me started on this?

>
> > So far i have a module to contain coefficients, a class to handle the
> > stream itself and 2 other classes to handle an organic solution
> > scenario or an aqueous solution scenario.


I don't see that as a big deal - the audience this will be catering
too can always create a list of temp's and drag the equation down to
make a column of data to go w/ the temps. All of which could then be
put into graph form.

any ideas on how to channel those highlighted regions of input into an
array or better yet - how i can use a class module for the overall
stream and smaller sections for density, viscosity, vapor pressure,
etc. ?

 
Reply With Quote
 
Ryan
Guest
Posts: n/a
 
      31st May 2007
On May 31, 3:35 pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com> wrote:
> You are going to run into a problem in that a User Defined Function can only
> return a value to the cell it is in. It can not create graphs or modify cell
> formats or modify the value of cells other than the one it is in... just
> return a value to the cell that it is in... A function called from within
> code can do all of these things but a UDF can not.
> --
> HTH...
>
> Jim Thomlinson
>
> "Ryan" wrote:
> > background:
> > i am creating a function that is dependent on a few different
> > variables. temperature, physical component, weight percent.

>
> > problem:
> > i would like the user to be able to type = on a cell and select my
> > function then click on a temperature OR range of temperatures,
> > highlight a list of components, and highlight the corresponding weight
> > percents) and have the function spit out the data via various
> > different function calls and eventually have that data go into charts
> > w/ a physical property on the Y axis and temperature on the X axis.

>
> > How do I let the user enter one value or a range of values and still
> > handle it?
> > How do i bring in multiple cells w/ strings and use a case statement
> > to step through each cell?
> > How can I ensure that the weight percent stays in the same order as
> > the name of component so i can ensure the equations will handle it
> > appropriately?

>
> > I am very new to VB and VBA but i'm learning as i'm going - any
> > suggestions on ideas to get me started on this?

>
> > So far i have a module to contain coefficients, a class to handle the
> > stream itself and 2 other classes to handle an organic solution
> > scenario or an aqueous solution scenario.


I don't see that as a big deal - the audience this will be catering
too can always create a list of temp's and drag the equation down to
make a column of data to go w/ the temps. All of which could then be
put into graph form.

any ideas on how to channel those highlighted regions of input into an
array or better yet - how i can use a class module for the overall
stream and smaller sections for density, viscosity, vapor pressure,
etc. ?

 
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
Creating my own user defined function help statements =?Utf-8?B?Q3JhaWc=?= Microsoft Excel Worksheet Functions 2 22nd Feb 2006 04:51 PM
creating help info for user defined function Joe Carroll Microsoft Excel Discussion 3 4th Jun 2005 11:57 PM
Newby help! Creating user-input defined search queries... =?Utf-8?B?RWQgRw==?= Microsoft Access Queries 3 28th Apr 2004 02:41 PM
Creating user defined function David K. Microsoft Excel Worksheet Functions 0 20th Nov 2003 07:24 PM
Creating user defined function David K. Microsoft Excel Misc 1 20th Nov 2003 07:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:48 PM.