Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Multiple input variables

I am trying to make a macro that will allow me to specify the number of
compounds that will be used in an experiment and then display that many
input boxes (or a list box if that will work) for the user to input the
names of the compounds. I am having a hard time figuring out if this
is possible because the loop doesn't seem to want to keep the names of
each compound separate. Any help would be much appreciated.

TIA
Stephen

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Multiple input variables

Try something like this:
Dim numCompounds as long
Dim cnt as long
numCompounds = InputBox("Enter the Number of Compounds")
For cnt = 1 to numCompounds
Range("A" & cnt) = InputBox("Please Enter Compound " & cnt)
next

Charles
wrote:
I am trying to make a macro that will allow me to specify the number of
compounds that will be used in an experiment and then display that many
input boxes (or a list box if that will work) for the user to input the
names of the compounds. I am having a hard time figuring out if this
is possible because the loop doesn't seem to want to keep the names of
each compound separate. Any help would be much appreciated.

TIA
Stephen


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Multiple input variables

So would there be a way to call on these later on? If I was to specify
what compounds were there and then input a range of data is there a way
to enter what cells contain what compounds to make calculations easier?
Most compounds will have multiple cells which will require an average.
Die_Another_Day wrote:
Try something like this:
Dim numCompounds as long
Dim cnt as long
numCompounds = InputBox("Enter the Number of Compounds")
For cnt = 1 to numCompounds
Range("A" & cnt) = InputBox("Please Enter Compound " & cnt)
next

Charles
wrote:
I am trying to make a macro that will allow me to specify the number of
compounds that will be used in an experiment and then display that many
input boxes (or a list box if that will work) for the user to input the
names of the compounds. I am having a hard time figuring out if this
is possible because the loop doesn't seem to want to keep the names of
each compound separate. Any help would be much appreciated.

TIA
Stephen


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Multiple input variables

Thanks so much for your help, I have been trying to work this out to
make my research easier for a week now. I figured I would be able to
get it all done myself, apparently not though.

Thanks again
Die_Another_Day wrote:
Use an array variable:
Dim Compounds() As String
Dim numCompounds as long
Dim cnt as long
numCompounds = InputBox("Enter the Number of Compounds")
ReDim Compounds(1 to numCompounds)
For cnt = 1 to numCompounds
Compounds(cnt) = InputBox("Please Enter Compound " & cnt)
next

Then Reference like this:
Variable1 = Compounds(1)

Charles

wrote:
So would there be a way to call on these later on? If I was to specify
what compounds were there and then input a range of data is there a way
to enter what cells contain what compounds to make calculations easier?
Most compounds will have multiple cells which will require an average.
Die_Another_Day wrote:
Try something like this:
Dim numCompounds as long
Dim cnt as long
numCompounds = InputBox("Enter the Number of Compounds")
For cnt = 1 to numCompounds
Range("A" & cnt) = InputBox("Please Enter Compound " & cnt)
next

Charles
wrote:
I am trying to make a macro that will allow me to specify the number of
compounds that will be used in an experiment and then display that many
input boxes (or a list box if that will work) for the user to input the
names of the compounds. I am having a hard time figuring out if this
is possible because the loop doesn't seem to want to keep the names of
each compound separate. Any help would be much appreciated.

TIA
Stephen




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Multiple input variables

I had one more quick question, so if I were to put in the data in an
array format (8x8, 9x9, etc.) is there any way that I would be able to
highlight the cells that correspond to compound 1 (say cells 1-4),
compound 2 (5-8), etc. and have the macro calculate averages based on
this? Sometimes my data will get up to 12x12 and writing a repetitive
if...then statement covering sample numbers ranging from 1-48 would be
really tedious. Not sure if there is a way that the you can denote
cells on a template lets say and have excel use the corresponding cells
for calculations.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Multiple input variables

So basically I have a 96 well plate (rows A-H, columns 1-12). I do
duplicate samples (2 wells per sample). The problem is that the layout
of my plate is not always the same. Sometimes I have samples in B1:B2
and sometimes there may be controls there. Basically I am hoping there
is a way to tell excel, if I have the formula, to use sample 1 data
(whatever cells I tell excel they are in) to calculate what I need. It
would be easy to set up if my plate always had the same layout, but
that isn't always the case. So essentially I am looking for a way to
tell excel that 2 to n data points are from sample one and to calculate
an average from those 2 to n data points.

Die_Another_Day wrote:
I have no idea what you are asking, but it sounds simple if I can
figure out what you want to do...

Charles

wrote:
I had one more quick question, so if I were to put in the data in an
array format (8x8, 9x9, etc.) is there any way that I would be able to
highlight the cells that correspond to compound 1 (say cells 1-4),
compound 2 (5-8), etc. and have the macro calculate averages based on
this? Sometimes my data will get up to 12x12 and writing a repetitive
if...then statement covering sample numbers ranging from 1-48 would be
really tedious. Not sure if there is a way that the you can denote
cells on a template lets say and have excel use the corresponding cells
for calculations.


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Multiple input variables

I apologize for being dense, but I still don't quite see what you want.
Do you have Row and Column headings to go off of? Could you email me an
example workbook of what you are trying to do?

Charles


wrote:
So basically I have a 96 well plate (rows A-H, columns 1-12). I do
duplicate samples (2 wells per sample). The problem is that the layout
of my plate is not always the same. Sometimes I have samples in B1:B2
and sometimes there may be controls there. Basically I am hoping there
is a way to tell excel, if I have the formula, to use sample 1 data
(whatever cells I tell excel they are in) to calculate what I need. It
would be easy to set up if my plate always had the same layout, but
that isn't always the case. So essentially I am looking for a way to
tell excel that 2 to n data points are from sample one and to calculate
an average from those 2 to n data points.

Die_Another_Day wrote:
I have no idea what you are asking, but it sounds simple if I can
figure out what you want to do...

Charles

wrote:
I had one more quick question, so if I were to put in the data in an
array format (8x8, 9x9, etc.) is there any way that I would be able to
highlight the cells that correspond to compound 1 (say cells 1-4),
compound 2 (5-8), etc. and have the macro calculate averages based on
this? Sometimes my data will get up to 12x12 and writing a repetitive
if...then statement covering sample numbers ranging from 1-48 would be
really tedious. Not sure if there is a way that the you can denote
cells on a template lets say and have excel use the corresponding cells
for calculations.


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Multiple input variables

Charles,
Let me know if I'm on the right track.

So each sample
- takes up 2 wells
- can contain multiple compounds

And there will (probably) be duplicates in the compounds used among all the
samples.

And a well may contain a control instead of a sample

NickHK

wrote in message
ups.com...
So basically I have a 96 well plate (rows A-H, columns 1-12). I do
duplicate samples (2 wells per sample). The problem is that the layout
of my plate is not always the same. Sometimes I have samples in B1:B2
and sometimes there may be controls there. Basically I am hoping there
is a way to tell excel, if I have the formula, to use sample 1 data
(whatever cells I tell excel they are in) to calculate what I need. It
would be easy to set up if my plate always had the same layout, but
that isn't always the case. So essentially I am looking for a way to
tell excel that 2 to n data points are from sample one and to calculate
an average from those 2 to n data points.

Die_Another_Day wrote:
I have no idea what you are asking, but it sounds simple if I can
figure out what you want to do...

Charles

wrote:
I had one more quick question, so if I were to put in the data in an
array format (8x8, 9x9, etc.) is there any way that I would be able to
highlight the cells that correspond to compound 1 (say cells 1-4),
compound 2 (5-8), etc. and have the macro calculate averages based on
this? Sometimes my data will get up to 12x12 and writing a repetitive
if...then statement covering sample numbers ranging from 1-48 would be
really tedious. Not sure if there is a way that the you can denote
cells on a template lets say and have excel use the corresponding

cells
for calculations.






  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Multiple input variables

Each sample will be in at least 2 wells (up to 12 wells per sample
though) and there will only be one sample per well. The reason I need
something that will allow me to specify which wells have which sample
is because there can be anywhere from 2-12 wells per sample. And yes,
there will always be controls somewhere in the data. But each well
will only contain a single sample or a single control.
NickHK wrote:
Charles,
Let me know if I'm on the right track.

So each sample
- takes up 2 wells
- can contain multiple compounds

And there will (probably) be duplicates in the compounds used among all the
samples.

And a well may contain a control instead of a sample

NickHK

wrote in message
ups.com...
So basically I have a 96 well plate (rows A-H, columns 1-12). I do
duplicate samples (2 wells per sample). The problem is that the layout
of my plate is not always the same. Sometimes I have samples in B1:B2
and sometimes there may be controls there. Basically I am hoping there
is a way to tell excel, if I have the formula, to use sample 1 data
(whatever cells I tell excel they are in) to calculate what I need. It
would be easy to set up if my plate always had the same layout, but
that isn't always the case. So essentially I am looking for a way to
tell excel that 2 to n data points are from sample one and to calculate
an average from those 2 to n data points.

Die_Another_Day wrote:
I have no idea what you are asking, but it sounds simple if I can
figure out what you want to do...

Charles

wrote:
I had one more quick question, so if I were to put in the data in an
array format (8x8, 9x9, etc.) is there any way that I would be able to
highlight the cells that correspond to compound 1 (say cells 1-4),
compound 2 (5-8), etc. and have the macro calculate averages based on
this? Sometimes my data will get up to 12x12 and writing a repetitive
if...then statement covering sample numbers ranging from 1-48 would be
really tedious. Not sure if there is a way that the you can denote
cells on a template lets say and have excel use the corresponding

cells
for calculations.



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Multiple input variables

How are you getting your data - from a platereader? Is there anything in
the datafile which maps to specific well contents ?

What format is the file - linear or matrix ? It's sometimes easier to
design anround the raw data format...
And it sounds like your plate layout is not fixed either (12 x 12 ?)

Tim


wrote in message
ups.com...
Each sample will be in at least 2 wells (up to 12 wells per sample
though) and there will only be one sample per well. The reason I need
something that will allow me to specify which wells have which sample
is because there can be anywhere from 2-12 wells per sample. And yes,
there will always be controls somewhere in the data. But each well
will only contain a single sample or a single control.
NickHK wrote:
Charles,
Let me know if I'm on the right track.

So each sample
- takes up 2 wells
- can contain multiple compounds

And there will (probably) be duplicates in the compounds used among all
the
samples.

And a well may contain a control instead of a sample

NickHK

wrote in message
ups.com...
So basically I have a 96 well plate (rows A-H, columns 1-12). I do
duplicate samples (2 wells per sample). The problem is that the layout
of my plate is not always the same. Sometimes I have samples in B1:B2
and sometimes there may be controls there. Basically I am hoping there
is a way to tell excel, if I have the formula, to use sample 1 data
(whatever cells I tell excel they are in) to calculate what I need. It
would be easy to set up if my plate always had the same layout, but
that isn't always the case. So essentially I am looking for a way to
tell excel that 2 to n data points are from sample one and to calculate
an average from those 2 to n data points.

Die_Another_Day wrote:
I have no idea what you are asking, but it sounds simple if I can
figure out what you want to do...

Charles

wrote:
I had one more quick question, so if I were to put in the data in
an
array format (8x8, 9x9, etc.) is there any way that I would be able
to
highlight the cells that correspond to compound 1 (say cells 1-4),
compound 2 (5-8), etc. and have the macro calculate averages based
on
this? Sometimes my data will get up to 12x12 and writing a
repetitive
if...then statement covering sample numbers ranging from 1-48 would
be
really tedious. Not sure if there is a way that the you can denote
cells on a template lets say and have excel use the corresponding

cells
for calculations.




Reply
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
Array for varying 2 out of many input variables for complicated fx MontyCR Excel Discussion (Misc queries) 0 April 10th 09 07:13 PM
How can I have have one column's input depend on the variables in a second one? willb Excel Worksheet Functions 3 October 18th 06 12:31 PM
Using Ranges to input variables to UDF Peter Bradley Excel Programming 3 October 3rd 04 12:14 PM
Input Command with Mainframe file and multiple variables BSchwerdt[_2_] Excel Programming 4 December 17th 03 11:47 PM
Input variables on Sheet1 being called by a VB program on Sheet 2 RU42 Excel Programming 1 August 23rd 03 09:50 AM


All times are GMT +1. The time now is 03:18 AM.

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"