ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to put values instead of formulas into matrix? (https://www.excelbanter.com/excel-programming/371531-how-put-values-instead-formulas-into-matrix.html)

Gijs Breedveld

How to put values instead of formulas into matrix?
 
Hi, I am trying to reduce the size om my large file. Therefor I want to use a
macro to put values instead of formulas into a matrix.

The datafile is pulled from a database and looks as follows:
Col A : "Date in"
Col B : "Person"
Col C : "Date start"
Col D: "Date end"

I want to calculate
Col E: "week start"
Col D: "week end"
Col F: "Week start" - "week in"

The amount of lines increases each week by an unknown amount. Therefor the
code needs to look how many lines are added. Also the "date start" and "date
end" do change for existing records. Therefor all the lines need to be
recalculated every time.

I have been searching the files and putting pieces of code together but
nothing gave the wanted end result.

I hope someone can help me.

Best regards,

Gijs Breedveld



Gary''s Student

How to put values instead of formulas into matrix?
 
One approach:

1. store the spreadsheet without formulae
2. have a macro paste the formulae into the appropriate columns and convert
to values.
3. before storing the updated worksheet even the calculated values can be
cleared since the will be re-created at the next update
--
Gary's Student


"Gijs Breedveld" wrote:

Hi, I am trying to reduce the size om my large file. Therefor I want to use a
macro to put values instead of formulas into a matrix.

The datafile is pulled from a database and looks as follows:
Col A : "Date in"
Col B : "Person"
Col C : "Date start"
Col D: "Date end"

I want to calculate
Col E: "week start"
Col D: "week end"
Col F: "Week start" - "week in"

The amount of lines increases each week by an unknown amount. Therefor the
code needs to look how many lines are added. Also the "date start" and "date
end" do change for existing records. Therefor all the lines need to be
recalculated every time.

I have been searching the files and putting pieces of code together but
nothing gave the wanted end result.

I hope someone can help me.

Best regards,

Gijs Breedveld



Joergen Bondesen

How to put values instead of formulas into matrix?
 
Hi Gijs

What is "week start" and how do i calculate this. Is it the week for "Date
start"

What is "week end" and how do i calculate this. Is it the week for "Date
end"

Is it the difference you want and you mean "week in"?

Are you quit sure aboute the new columns, D?

Date cells are real dates?


Can you give an e.g. please.
--
Best regards
Joergen Bondesen


"Gijs Breedveld" wrote in message
...
Hi, I am trying to reduce the size om my large file. Therefor I want to
use a
macro to put values instead of formulas into a matrix.

The datafile is pulled from a database and looks as follows:
Col A : "Date in"
Col B : "Person"
Col C : "Date start"
Col D: "Date end"

I want to calculate
Col E: "week start"
Col D: "week end"
Col F: "Week start" - "Week start" - "week in"
The amount of lines increases each week by an unknown amount. Therefor the
code needs to look how many lines are added. Also the "date start" and
"date
end" do change for existing records. Therefor all the lines need to be
recalculated every time.

I have been searching the files and putting pieces of code together but
nothing gave the wanted end result.

I hope someone can help me.

Best regards,

Gijs Breedveld






All times are GMT +1. The time now is 02:36 PM.

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