I'm working on a fixed width to CSV macro. The macro works as expected, the macro validates the field lengths vs the secondary file that houses the lengths to check. It is supposed to put the word "Pass" or "Fail" under the field lengths in the Excel row for each field. The problem is it only validates the first cell against the second cell and Auto Fills the rest based on the number of fields in a given file.
It needs to be able to validate each cell value against the field length vs validating the secondary file called "input_layout"
Range("B2").Select
Selection.AutoFill Destination:=Range(Cells(2, 2), Cells(2, col_count)), Type:=xlFillDefault
Range(Cells(2, 1), Cells(2, col_count)).Interior.ColorIndex = 6
ActiveSheet.Cells(3, 2).Formula = "=IF(B$1=B$2,""Pass"",""Fail"")"
Range("B3").Select
Selection.AutoFill Destination:=Range(Cells(3, 2), Cells(3, col_count)), Type:=xlFillDefault
Range(Cells(3, 1), Cells(3, col_count)).Interior.ColorIndex = 28
Range(Cells(1, 1), Cells(1, col_count)).Interior.ColorIndex = 39