At work we have a vendor program that we use to export reports to excel (the canned reports are less than helpful). The format of the export requires modification to be useful. I've attached a small screen shot sample. In column A excel shows everything formatted as general, except dollar amounts are as currency. The other number in the column is a location ID. With the code I want to insert a blank row after each row where column A has a currency value. The piece of code dealing with this follows:
Dim LastRow As Double
Dim RowCtr As Double
LastRow = 2000
For RowCtr = 1 To LastRow
If Cells(RowCtr, "A") = ??Currency?? Then
Rows(RowCtr + 1).Insert
RowCtr = RowCtr + 1
End If
Next RowCtr
I think I need to use numberformat but I'm not sure how to apply it in this situation. I tried just using 0 where ??Currency?? is because I thought the value always was 0, but I was wrong. I'm using Excel 2007.
Thank you,
renigar
Dim LastRow As Double
Dim RowCtr As Double
LastRow = 2000
For RowCtr = 1 To LastRow
If Cells(RowCtr, "A") = ??Currency?? Then
Rows(RowCtr + 1).Insert
RowCtr = RowCtr + 1
End If
Next RowCtr
I think I need to use numberformat but I'm not sure how to apply it in this situation. I tried just using 0 where ??Currency?? is because I thought the value always was 0, but I was wrong. I'm using Excel 2007.
Thank you,
renigar