![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Williston ND
Posts: 55
|
Yes I like it. Changed it some what to suit my needs. Thx alot. INT() is a new one for me I can use that alot. Remember to save first or it will get ugly.
Been gone awhile Paul |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Location: Williston ND
Posts: 55
|
I am sure this has been covered but I not getting any results on the search. I would like a macro to look down a column of numbers (10,000 rows)and delete the entire row (or hide the row) that doesn't have a whole number in it. Like this:
240.00 keep row 256.02 delete row 564.46 delete row 560.00 keep row ............ there are 2 other columns of numbers along side the row in question, and those numbers would be deleted or (hide) along with the non whole numbers. Is this possible. I tried endlessly but my macro ability is early beginer at best. And with so many command choices....well you know. Paul |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Assuming your numbers are in column A ;-
Dim rng As Range Set rng = Range([A1], [A65536].End(xlUp)) rng.EntireColumn.Insert With rng.Offset(0, -1) .FormulaR1C1 = "=IF(RC[1]-INT(RC[1])=0,1,"""")" On Error Resume Next .SpecialCells(xlCellTypeFormulas, 2).EntireRow.Delete On Error GoTo 0 .EntireColumn.Delete End With |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|