Answer the question
In order to leave comments, you need to log in
How to display data in excel?
Given an excel table of the following form.
| A | b |
|-----------------|---|
| Ivanov I.I. | A |
|______________ | b |
| Petrov P.P. | A |
|______________ | b |
|_______________ | c |
| Sidorov S.S. | A |
|_______________| b |
| Petrova A.V. | A |
|_______________ | b |
|_______________ | c |
must be converted by a macro to this form
| A | b |
|-----------------|---|
| Ivanov I.I. | A |
| Ivanov I.I. | b |
| Petrov P.P. | A |
| Petrov P.P. | b |
| Petrov P.P. | c |
| Sidorov S.S. | A |
| Sidorov S.S. | b |
| Petrova A.V. | A |
| Petrova A.V. | b |
| Petrova A.V. | c |
Answer the question
In order to leave comments, you need to log in
Finished it myself. Perhaps, to whom the thread is useful
Sub hi
Dim i, j
i = 1
j = 1
while(range("B" & i +1).Value <> 0)
If Range ("A" & i).Value <> 0 then
Range ("D" & i).Value = Range ("A" & i).Value
end If
If Range ("D" & i).Value = 0 then
Range ("D" & i + 1).Value = Range ("A" & i).Value
end If
i=i+1
wend
while(range("B" & j).Value <> 0)
Range ("E" & j).Value = Range ("B" & j).Value
j=j+1
wend
End sub
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question