Can I do this without VBA?

W

widman

I have this in a VBA formula that I want to get into a regular excel sheet
without the VBA. I can easily work with the five values once I can figure
out the +273 as double. What does that mean and how can I put this into an
excel sheet


Set cell = ActiveCell
T1 = cell.Offset(0, 0).Value + 273#
T2 = cell.Offset(1, 0).Value + 273#
cSt1 = cell.Offset(3, 0).Value
cSt2 = cell.Offset(4, 0).Value
T3 = cell.Offset(5, 0).Value + 273#
 
M

Martin Fishlock

Widman,

The five statements are merely assigning values to five variables T1, T2,
cSt1, cSt2 and T3.

from the current cell and the four cells underneath it.

Without knowing how the numbers are transformed it is a little difficult to
advise on the formula required.
 
M

Martin Fishlock

The hash (#) tells VBA that the number is of a double type.

A double type is merely a larger floating point number (ie any number) and so

T1 = cell.Offset(0, 0).Value + 273#

takes the value in the active cell adds 273 to it and puts it in T1.

T2 = cell.Offset(1, 0).Value + 273#

takes the value in the cell underneath the active cell and adds 273 to it
and puts it in T2.

The

cSt1 = cell.Offset(3, 0).Value

appears to be a text value.
 
F

Fred Smith

To do the same thing in a worksheet, you need to have 5 cells to store the
values, and you need to know where the active cell is. Let's say the active cell
is a1, and you are going to store your values in b1 to b5. Your formulas would
be:

b1: =a1+273
b2: =a2+273
b3: =a4
b4: =a5
b5: =a6+273
 
W

widman

thanks for that explanation. I'll have to work with it now to look for other
possible errors.
 
Top