PippaThePointer
New Member
- Joined
- Sep 21, 2023
- Messages
- 31
- Office Version
- 2016
- Platform
- Windows
Hi,
I have a line in my VBA that very neatly removes all rows that have blank in row 'QTY'
Columns("D").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
I would like to do the same if the the cell D is not a number. According to Microsoft page i can do it with the following, but i can work out how to write it. Ive tried everything.
"Optional Object. If Type is either xlCellTypeConstants or xlCellTypeFormulas, this argument is used to determine which types of cells to include in the result. These values can be added together to return more than one type. The default is to select all constants or formulas, no matter what the type. Can be one of the following XlSpecialCellsValue constants:xlErrorsxlLogicalxlNumbersxlTextValues"
I thought i would just need "Columns("D").SpecialCells(xlCellTypeConstants:xlTextValues).EntireRow.Delete"
Can anyone help me out?
I have a line in my VBA that very neatly removes all rows that have blank in row 'QTY'
Columns("D").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
I would like to do the same if the the cell D is not a number. According to Microsoft page i can do it with the following, but i can work out how to write it. Ive tried everything.
"Optional Object. If Type is either xlCellTypeConstants or xlCellTypeFormulas, this argument is used to determine which types of cells to include in the result. These values can be added together to return more than one type. The default is to select all constants or formulas, no matter what the type. Can be one of the following XlSpecialCellsValue constants:xlErrorsxlLogicalxlNumbersxlTextValues"
I thought i would just need "Columns("D").SpecialCells(xlCellTypeConstants:xlTextValues).EntireRow.Delete"
Can anyone help me out?