P
P
Pavel2021-03-01 14:49:42
excel
Pavel, 2021-03-01 14:49:42

Is there a way to write a script for excel as a display on another sheet?

a difficult task, I don’t know if it’s possible to do this at all, there is a plate with data on wages, you need to form “roots” on another sheet,
the table itself looks like this,
43yLyPg.png

and you need to form it like this,

AsX1xuR.png

in fact, just displaying the data in a convenient form, without formulas, but .. If the person's status is "no" (not working), then do not take this line into account

. I understand this is more a task than a question, but maybe there is already a ready-made solution? If not, is there an example that can be done? Well, or who can actually do it for coins?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
idShura, 2021-03-02
@mrusklon

Private Sub CommandButton1_Click()

Application.ScreenUpdating = False

Sheets("Корешки").Range("A1:AC200").ClearContents

i = 2
j = 0
Offset1 = 0 'Смещение по вертикали
Offset2 = 0 'Смещение по горизонтали

Do While Sheets("Таблица").Cells(i, 1) <> ""
    
    If Sheets("Таблица").Cells(i, 3) = "да" Then

        Sheets("Корешки").Cells(1 + Offset1, 1 + Offset2).Value = Sheets("Таблица").Cells(i, 4)
        
        Sheets("Корешки").Cells(2 + Offset1, 1 + Offset2).Value = "Зарплата"
        Sheets("Корешки").Cells(2 + Offset1, 2 + Offset2).Value = Sheets("Таблица").Cells(i, 1)
        
        Sheets("Корешки").Cells(3 + Offset1, 1 + Offset2).Value = "пеработк"
        Sheets("Корешки").Cells(3 + Offset1, 2 + Offset2).Value = Sheets("Таблица").Cells(i, 8)
        
        Sheets("Корешки").Cells(4 + Offset1, 1 + Offset2).Value = "премия"
        Sheets("Корешки").Cells(4 + Offset1, 2 + Offset2).Value = Sheets("Таблица").Cells(i, 10)
        
        Sheets("Корешки").Cells(5 + Offset1, 1 + Offset2).Value = "Карточка"
        Sheets("Корешки").Cells(5 + Offset1, 2 + Offset2).Value = Sheets("Таблица").Cells(i, 9)
        
        Sheets("Корешки").Cells(6 + Offset1, 1 + Offset2).Value = "аванс нал"
        Sheets("Корешки").Cells(6 + Offset1, 2 + Offset2).Value = Sheets("Таблица").Cells(i, 14)
        
        Sheets("Корешки").Cells(7 + Offset1, 1 + Offset2).Value = "Итого:"
        Sheets("Корешки").Cells(7 + Offset1, 2 + Offset2).Value = Sheets("Таблица").Cells(i, 11)
        
        Sheets("Корешки").Cells(8 + Offset1, 2 + Offset2).Value = Sheets("Таблица").Cells(i, 12)
        
        Sheets("Корешки").Cells(9 + Offset1, 2 + Offset2).Value = Sheets("Таблица").Cells(i, 11) + Sheets("Таблица").Cells(i, 12)

        Offset2 = Offset2 + 3
        
        If j = 9 Then
            j = 0
            Offset1 = Offset1 + 10
            Offset2 = 0
    
        Else
            j = j + 1
        End If
        
    End If
    
    i = i + 1
    
Loop

Application.ScreenUpdating = True

End Sub

B
BasiC2k, 2021-03-01
@BasiC2k

Probably yes - your question is more of a task that any freelance site can help with.

A
Alexander, 2021-03-01
@ForestAndGarden

Solutions like "printing labels and price tags from Excel" are suitable for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question