PHIL.Pearce84
Board Regular
- Joined
- May 16, 2011
- Messages
- 152
- Office Version
- 365
- Platform
- Windows
Hi,
am looking at a former colleagues spreadsheet, and I am trying to determine where h data is company is? But am at a complete lost????
please help, code is below:
am looking at a former colleagues spreadsheet, and I am trying to determine where h data is company is? But am at a complete lost????
please help, code is below:
Code:
Sub Fileoutput()
' Applies combination of corrections and successfull lookup data into format ready for upload
Dim C, D
Application.ScreenUpdating = False
For C = 2 To 60000
If Sheets("Upload Data Copy").Range("T" & C).Value = "" Then
Exit For
End If
For D = 4 To 2000
If Sheets("Upload Data Copy").Range("T" & C).Value = "No Lookup Information Found" Then
If Sheets("Upload Data Copy").Range("C" & C).Value = Sheets("Errors").Range("A" & D + 2).Value Then
Sheets("Upload Data Copy").Range("V" & C).Value = Sheets("Errors").Range("G" & D + 2).Value
Sheets("Upload Data Copy").Range("F" & C).Value = Sheets("Errors").Range("D" & D + 2).Value
End If
Else
Sheets("Upload Data Copy").Range("V" & C).Value = Sheets("Upload Data Copy").Range("T" & C).Value
Exit For
End If
Next D
Next C
' Formats data worksheet ready for upload
Sheets("Upload Data Copy").Visible = True
Sheets("Upload Data Copy").Select
Cells.EntireColumn.AutoFit
Cells.HorizontalAlignment = xlLeft
Sheets("Errors").Visible = xlVeryHidden
Sheets("Upload Data").Visible = xlVeryHidden
Sheets("Upload Data Copy").Select
Range("V1").Select
Selection.Locked = True
Selection.FormulaHidden = True
ActiveCell.FormulaR1C1 = "Frameworks Technician ID"
Columns("T:U").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Insert Shift:=xlToRight
Columns("M:M").Select
Selection.Delete Shift:=xlToLeft
Columns("R:S").Select
Selection.Delete Shift:=xlToLeft
Columns("Q:Q").Select
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Range("E1").Select
ActiveCell.FormulaR1C1 = "Delivery Note Line No"
Range("Q1").Select
ActiveCell.FormulaR1C1 = "Quantity UOM Description"
Range("R1").Select
ActiveCell.FormulaR1C1 = "Price UOM Description"
Range("A2").Select
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: