I am having trouble coming up with a VBA code creating a new column with values based on an existing column. The code I have is shown below. Attached is an image of the excel file I am working with. I am initially extracting an excel file from SAP, so the column values (Start Date) are constantly changing (both the values and the number of values. Column L ('Days') was obtained based on the previous column J ('start date'). I am trying to make Column M ('Aged') based on what Column L ('Days') is. If Column L has a value of less than 6, I would like Column M = 0. Otherwise, I would like Column M = 1.
Excel file.JPG
(A/Z)
For some reason, the days value is being populated (as seen in the screenshot), but the aged row is being left blank (except for the header). Does anybody know why this would be the case? Is there something wrong with my if statement?
Let me know if you need any more information. Thanks in advance for the help.
Bookmarks