ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can I do this without VBA? (https://www.excelbanter.com/excel-worksheet-functions/122759-can-i-do-without-vba.html)

widman

Can I do this without VBA?
 
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#


Martin Fishlock

Can I do this without VBA?
 
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.


--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"widman" wrote:

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#


widman

Can I do this without VBA?
 

What does the # or "double" do? The formula doesn't work by just adding
273. I presume the # tells it to do something, but can't find any reference
as to what.
"Martin Fishlock" wrote:

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.


--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"widman" wrote:

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#


widman

Can I do this without VBA?
 

What does the # or "double" do? The formula doesn't work by just adding
273. I presume the # tells it to do something, but can't find any reference
as to what.
"Martin Fishlock" wrote:

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.


--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"widman" wrote:

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#


Martin Fishlock

Can I do this without VBA?
 
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.


--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"widman" wrote:


What does the # or "double" do? The formula doesn't work by just adding
273. I presume the # tells it to do something, but can't find any reference
as to what.
"Martin Fishlock" wrote:

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.


--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"widman" wrote:

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#


Fred Smith

Can I do this without VBA?
 
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

--
Regards,
Fred


"widman" wrote in message
...
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#




widman

Can I do this without VBA?
 
thanks for that explanation. I'll have to work with it now to look for other
possible errors.

"Martin Fishlock" wrote:

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.


--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"widman" wrote:


What does the # or "double" do? The formula doesn't work by just adding
273. I presume the # tells it to do something, but can't find any reference
as to what.
"Martin Fishlock" wrote:

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.


--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"widman" wrote:

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#



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com