for iRow=1 to oSheet.usedRange.rows.count-2 append blank for iCol=1 to oSheet.usedRange.columns.count cFieldName=oSheet.cells(2,iCol).text cFieldVal=oSheet.cells(iRow+2,iCol).value replace &cFieldName with cFieldVal endfor endfor