Macro Help
Colb
To get the last row with data and delete (assuming that there will always be data in column A
Rows(Range("a65536").End(xlUp).Row).Selec
Selection.Delete Shift:=xlU
To cycle through column E (again it assumes that there will be data in every cell
Range("e1").selec
while not isempty(activecell
activecell.offset(0,1).value = ....
activecell.offset(1,0).selec
wen
To get the value of the error code, there are various ways to do it. One way is to have a lookup table somewhere in the workbook and then use worksheetfunction.vlookup to get the description and put in in the next column. This would replace the ... above. Or you could put in a vlookup formula into column F and just copy it down and let it calculate. This would chagne the line to be activecell.offset(0,1).formula = "=vlookup(.....)
Ton
----- colby s wrote: ----
I have a worksheet I import a text file into and then remove certai
columns and format the sheet. The problem I am having is that the la
row always has data in it I don't need. I need to know how to find th
last row with data and then delete it through VBA code. The secon
problem is I have a column (column E) with error codes in it and
want to be able to go through every cell in that column and for eac
error code put the error reason in column F next to that row. I wa
thinking of looping through the rows in column E but was not sure ho
to. Any help would be appreciated
|