Good day,
I have an inventory report that is about 20 years old that is used as a count sheet. It does what it should but I need to make it into a data sheet for Vlookups when inventory time rolls around.
The report has sections for each Department. Each department has sections for location like an area or room number.
The data header row has in F18 Asset Type / Description.
The records are like F20 Asset Type, then F21 has the Description. The have a similar field length so I can see why the report was designed this way.
I have inserted a colum G so I can move the description from line 21 to line 20. Then I can select rows 21 and 22 and delete.
I recorded a macro and moved my data twice:
Sub Macro1()
' Macro1 Macro
'
Range("F21").Select
Selection.Copy
Range("G20").Select
ActiveSheet.Paste
Rows("21:22").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Range("F22").Select
Selection.Copy
Range("G21").Select
ActiveSheet.Paste
End Sub
What I really want is to copy the cell I am in, move up a row and over one column and paste. Then select the next two rows and delete. My cursor should end up in the next asset description. I don't want to use cell references because they will change. I want to use the cell selection and then subtract and add rows and columns
Appreciate any help.
I have an inventory report that is about 20 years old that is used as a count sheet. It does what it should but I need to make it into a data sheet for Vlookups when inventory time rolls around.
The report has sections for each Department. Each department has sections for location like an area or room number.
The data header row has in F18 Asset Type / Description.
The records are like F20 Asset Type, then F21 has the Description. The have a similar field length so I can see why the report was designed this way.
I have inserted a colum G so I can move the description from line 21 to line 20. Then I can select rows 21 and 22 and delete.
I recorded a macro and moved my data twice:
Sub Macro1()
' Macro1 Macro
'
Range("F21").Select
Selection.Copy
Range("G20").Select
ActiveSheet.Paste
Rows("21:22").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Range("F22").Select
Selection.Copy
Range("G21").Select
ActiveSheet.Paste
End Sub
What I really want is to copy the cell I am in, move up a row and over one column and paste. Then select the next two rows and delete. My cursor should end up in the next asset description. I don't want to use cell references because they will change. I want to use the cell selection and then subtract and add rows and columns
Appreciate any help.