Results 1 to 5 of 5
Thread: variable (office Xp/ 2007)

20071021, 00:58 #1
 Join Date
 Jul 2007
 Posts
 11
 Thanks
 0
 Thanked 0 Times in 0 Posts
variable (office Xp/ 2007)
Respected Sir/Madam
I want to know how to use variable in excel 2007. e.g if we calculate the value like 12a + 3a = 15a. how can we write these values on excel sheet. Thankyou

20071021, 01:03 #2
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 31 Times in 31 Posts
Re: variable (office Xp/ 2007)
It's not quite clear to me what you want. If you perform a calculation in Visual Basic and want to store the result in a cell on a worksheet, you can use the following
Dim x As Double
' calculation goes here
...
x = ...
...
Range("B3") = x
This will store the value of x in cell B3 on the currently active worksheet. If you want to store it in a cell on another worksheet in the active workbook, use somehting like
Worksheets("Data").Range("B3") = x
And if you want to store the value in a cell on a worksheet in another open workbook, use something like
Workbooks("Test.xls").Worksheets("Data").Range("B3 ") = x

20071021, 01:23 #3
 Join Date
 Jul 2002
 Location
 Pittsburgh, Pennsylvania, USA
 Posts
 11,225
 Thanks
 14
 Thanked 342 Times in 335 Posts
Re: variable (office Xp/ 2007)
Like Hans, I am unclear of your question. If not using VB you could define the variable as a cell and define a formula in a cell like:
=12 * A1 + 3 * A1
and when the variable A1 is changed the cell value will change
Steve

20071021, 01:48 #4
 Join Date
 Jul 2007
 Posts
 11
 Thanks
 0
 Thanked 0 Times in 0 Posts
Re: variable (office Xp/ 2007)
Thankyou sir, both of you for your kind reply. ok I give you an idea about my question.
Let's assume we have salted water of different concentration. We convert it to our desired concentration. For this purpose pure concentration liquid is there. We use following formula to get desired values
C1 V1 + C2V2 = C3(V1+V2)
where C1 is the initial conc (known value)
where V 1 is the volume (known value) against conc
C2 is the conc of pure substance which should be added to achieve the desired product
V2 is the required value
C3 is the desired limit.
How can we solve it in excel thankyou

20071021, 02:09 #5
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 31 Times in 31 Posts
Re: variable (office Xp/ 2007)
I assume that you want to calculate the value of V2.
The attached workbook demonstrates two different approaches.
In the first, we use mathematics to backsolve the equation for V2.
In the second, we use the Goal Seek option from the Tools menu to let Excel do the work (see the instructions on the sheet).