![]() |
copy/paste column remove formulas
I need to copy a column and paste it special to remove formulas. The
columns position is variable. here's what i've tried so far *--remove formula for totals IF lnTotalColumn 1 loXLSheet.Columns(lnTotalColumn).Copy *!* loXLSheet.Range(Get_Col(lnTotalColumn)+ "1").PasteSpecial(xlPasteValues) *!* loXLSheet.Columns(lnTotalColumn).PasteSpecial(xlPa steValues) loXLSheet.Range(Get_Col(lnTotalColumn)+ "1").Select loXLSheet.Application.Selection.PasteSpecial(xlPas teValues) ENDIF Most threw error: OLE IDispatch exception code 0 from Microsoft Office Excel: This operation requires the merged cells to be identically sized... (1429) I'd rather not use selection. |
copy/paste column remove formulas
Sub columntovalues()
Columns("m").Value = Columns("m").Value End Sub or Columns(activecell.column).Value = Columns(activecell.column).Value -- Don Guillett SalesAid Software "sugargenius" wrote in message oups.com... I need to copy a column and paste it special to remove formulas. The columns position is variable. here's what i've tried so far *--remove formula for totals IF lnTotalColumn 1 loXLSheet.Columns(lnTotalColumn).Copy *!* loXLSheet.Range(Get_Col(lnTotalColumn)+ "1").PasteSpecial(xlPasteValues) *!* loXLSheet.Columns(lnTotalColumn).PasteSpecial(xlPa steValues) loXLSheet.Range(Get_Col(lnTotalColumn)+ "1").Select loXLSheet.Application.Selection.PasteSpecial(xlPas teValues) ENDIF Most threw error: OLE IDispatch exception code 0 from Microsoft Office Excel: This operation requires the merged cells to be identically sized... (1429) I'd rather not use selection. |
All times are GMT +1. The time now is 11:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com