Memory In Excel?

T

TrippinAnts22

Hey all. I have been using excel for some time, but have just started
getting into the programming and other sides of Excel. For a spread
sheet that I am working on, I currently get updated prices sent to me
every week and it is about 80 prices. What I would like to do is every
week when I get the sheet and have it update other things automatically,
I would like it to store the price in one column, and then update the
price in another column, and take the differential. Is this possible?

Example:

Stock Prices I get on 6/13 - store in Current Stock Price
Stock Prices I get on 6/20 - store in Current Stock Price, and move
6/13 to last week. I then want to subtract the two.
When 6/27 comes, I want to delete 6/13, move 6/20 to where 6/13 was,
and move 6/27 to 6/20. Is that possible?

Or, is it possible to take the date, and convert it somehow to a
number, and say if column A is less than column B,copy column B to
column A? if so could someone explain that as well. Thank you.

Thank you

Ben Farkas
(e-mail address removed)
 
M

Mike NG

Or, is it possible to take the date, and convert it somehow to a
number, and say if column A is less than column B,copy column B to
column A? if so could someone explain that as well. Thank you.
Dates are actually held as numbers - relative to the 1st Jan 1970 IIRC.
The decimal part then represents the time. Just assigning your date
variable to an integer variable should do the trick
 
T

TrippinAnts22

thanks, but how in a formula do you write something that says:


if date is less than another date, copy?
iknow the if statements, but how do you make it copy?
 
M

Mike NG

thanks, but how in a formula do you write something that says:


if date is less than another date, copy?
iknow the if statements, but how do you make it copy?
Sorry you need to do this in visual basic

e.g. WorkSheets("Sheet1").Cells(1,1) = WorkSheets("Sheet2").Cells(1,1)


I do some share manipulation where my shares spreadsheet opens another
workbook, then I prefix WorkSheets with something like
WorkBooks("Prices") - Prices being the name of the XLS file containing
the new share data
 
T

TrippinAnts22

sorry, so one more question with this, i use what you said in VBA, but
just doing that, it woudlnt work. To actually have it have the if
statements, can you explain to me what i do? Ihave used vba a few
times, but not too much to be able towrite scripts on my own.

THank you,

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top