1

Topic: excel data migration on other sheet

Hello help with the problem decision. It is necessary at button click of data migration and their copying a line TOTAL moved downwards, in this case it is fixed.
Also I am am tormented by a question in a waybill field D 3 - No) it is necessary for a waybill that after pushing the button of data migration waybill number changed (an example - 07-002. 07-it day of month. It changes the automatic machine every day and takes OS date. 002 it is waybill number this day (it just and should change at transfer button click)

2

Re: excel data migration on other sheet

What was specific causes difficulties?

3

Re: excel data migration on other sheet

I do not know as to make so that a total line drifted at data migration from 1 sheet on 2... I Know that is necessary it is necessary  a maximum in  lines in ranges "material" and "service", then on sheet "preorder"
To interpose the amount of lines equal to this maximum that the total line drifted downwards. And already after
It to transfer made room on each range in which too needs to be calculated.
But as it to make I do not know

4

Re: excel data migration on other sheet

There is a good method to learn, how something to make. On an example of an insertion of lines:
1) to include macro record
2) to interpose a line hands
3) to ungear macro record
4) to look that turned out

5

Re: excel data migration on other sheet

How to interpose that is example type

Dim l
l = Range ("A2").End (xlDown).Row
Rows (l AND ":" AND l).Insert Shift: = xlDown, CopyOrigin: = xlFormatFromLeftOrAbove
Cells (l, 1) = Cells (l - 1, 1) + 1
Cells (l, 1).Borders. Weight = xlThin

And here is how to make so that it count of lines in materials and services compared where more lines and interposed before copying on sheet of the preorder the greatest at lines between title and total line (. the purpose of all that the total line moved
Used

If Not IsEmpty (Sheets ("waybill").Cells (i, 4)) Then RowsCount = RowsCount + 1

That that does not quit
The moderator: we Learn to use tags of design of the code - FAQ

6

Re: excel data migration on other sheet

At you very bulky statements which hinder your understanding, . Break tasks into smaller until it becomes clear how to solve each of them.
What was specific now it is impossible? How to compare two variables, to clarify, what of them is more?

AntonioBanderas wrote:

that that does not quit

do not write "something does not quit" is absolutely useless statement. Describe an error, a problem, etc. Frequently while in writing formulate a problem, understand, how she dares.

7

Re: excel data migration on other sheet

At present the total line moves downwards, but the formula which to be in cells from total counts does not change (. = (N3:N5)) as was and remains. How to make so that also it changed too. And whether still it is possible to change it for all total line. . (that any formulas being in cells of a line too changed at shift of a total line

8

Re: excel data migration on other sheet

All thanks the decision such = ($N$3:N23)