Hello everyone,
I am not familiar with VBA but I look for a code that can help me to set up a report.
Basically, the code should find the word "Conf" and delete the range including the row containing the text string and 6 rows below etc..in a loop
Range("A2").Select
Cells.Find(What:="conf", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Rows("59:65").Select
Selection.Delete Shift:=xlUp
Then because I copy the data from a pdf I have some numbers or text in column A that should be cut and pasted in the last column of the above line. Likewise some numbers or text different from 2018 in Column A & B that should be cut and pasted in the last column above the line. So every time the expression i a line is different from "2018" than the number and text string should be pasted in the last column above.
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64"]A[/TD]
[TD="width: 64"] B [/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]2018[/TD]
[TD="width: 64, align: right"]1[/TD]
[TD="width: 64, align: right"]90712[/TD]
[/TR]
[TR]
[TD="align: right"]2018[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]90712[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 192"]
<tbody>[TR]
[TD="width: 64, align: right"][TABLE="width: 96"]
<tbody>[TR]
[TD="width: 64, align: right"]10006723 [/TD]
[TD="width: 64, align: right"]15392.64[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="width: 64, align: right"]
[/TD]
[TD="width: 64"][/TD]
[/TR]
</tbody>[/TABLE]
I hope it is clear enough and thank you for the help much appreciated,
best regards
MRDecarte
I am not familiar with VBA but I look for a code that can help me to set up a report.
Basically, the code should find the word "Conf" and delete the range including the row containing the text string and 6 rows below etc..in a loop
Range("A2").Select
Cells.Find(What:="conf", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Rows("59:65").Select
Selection.Delete Shift:=xlUp
Then because I copy the data from a pdf I have some numbers or text in column A that should be cut and pasted in the last column of the above line. Likewise some numbers or text different from 2018 in Column A & B that should be cut and pasted in the last column above the line. So every time the expression i a line is different from "2018" than the number and text string should be pasted in the last column above.
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64"]A[/TD]
[TD="width: 64"] B [/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]2018[/TD]
[TD="width: 64, align: right"]1[/TD]
[TD="width: 64, align: right"]90712[/TD]
[/TR]
[TR]
[TD="align: right"]2018[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]90712[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 192"]
<tbody>[TR]
[TD="width: 64, align: right"][TABLE="width: 96"]
<tbody>[TR]
[TD="width: 64, align: right"]10006723 [/TD]
[TD="width: 64, align: right"]15392.64[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="width: 64, align: right"]
[/TD]
[TD="width: 64"][/TD]
[/TR]
</tbody>[/TABLE]
I hope it is clear enough and thank you for the help much appreciated,
best regards
MRDecarte