ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I select non visible cells? (https://www.excelbanter.com/excel-programming/384808-how-can-i-select-non-visible-cells.html)

[email protected]

How can I select non visible cells?
 
I guess there are a couple of ways I could attack this problem. I
either need to be able to select cells that look blank but may not
actually be. Trying the 'goto/special/blanks' doesn't work even after
trying to paste special/values over the formulas in column C. Or I
need to be able to LEAVE the LAST duplicate cell in the list (i.e.
select all duplicate cells but the last one). This is what I have.

A B C
jeff 5
jeff 6
jeff 0 11
mike 3
mike 9 12

What's in column 'C' is a formula (=if(a1=a2,"",sumif(a$1:a2,a1,b
$1:b2)). I need someway to delete the rows that don't have a number
in column C.


Gary''s Student

How can I select non visible cells?
 
Sub kill_um()
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = n To 1 Step -1
If Cells(i, "C").Value = "" Then
Cells(i, "C").EntireRow.Delete
End If
Next
End Sub

--
Gary''s Student
gsnu200709


" wrote:

I guess there are a couple of ways I could attack this problem. I
either need to be able to select cells that look blank but may not
actually be. Trying the 'goto/special/blanks' doesn't work even after
trying to paste special/values over the formulas in column C. Or I
need to be able to LEAVE the LAST duplicate cell in the list (i.e.
select all duplicate cells but the last one). This is what I have.

A B C
jeff 5
jeff 6
jeff 0 11
mike 3
mike 9 12

What's in column 'C' is a formula (=if(a1=a2,"",sumif(a$1:a2,a1,b
$1:b2)). I need someway to delete the rows that don't have a number
in column C.



[email protected]

How can I select non visible cells?
 
On Mar 8, 8:22 am, Gary''s Student
wrote:
Sub kill_um()
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = n To 1 Step -1
If Cells(i, "C").Value = "" Then
Cells(i, "C").EntireRow.Delete
End If
Next
End Sub

--
Gary''s Student
gsnu200709



" wrote:
I guess there are a couple of ways I could attack this problem. I
either need to be able to select cells that look blank but may not
actually be. Trying the 'goto/special/blanks' doesn't work even after
trying to paste special/values over the formulas in column C. Or I
need to be able to LEAVE the LAST duplicate cell in the list (i.e.
select all duplicate cells but the last one). This is what I have.


A B C
jeff 5
jeff 6
jeff 0 11
mike 3
mike 9 12


What's in column 'C' is a formula (=if(a1=a2,"",sumif(a$1:a2,a1,b
$1:b2)). I need someway to delete the rows that don't have a number
in column C.- Hide quoted text -


- Show quoted text -


Thanks for the reply. Can you explain how I would use this?


Gary''s Student

How can I select non visible cells?
 
Macros are very easy to install and use:
1. CNTRL-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window (save not required)
If you save the workbook, the macro will be saved with it.

To use the Macro:
1. ALT-F8
2. Select the macro
3. Touch Run

To remove the macro:
1. bring up the VBE window as above
2. clear the code out
3. close the VBE window
To learn more about macros in general, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


--
Gary''s Student
gsnu200709


" wrote:

On Mar 8, 8:22 am, Gary''s Student
wrote:
Sub kill_um()
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = n To 1 Step -1
If Cells(i, "C").Value = "" Then
Cells(i, "C").EntireRow.Delete
End If
Next
End Sub

--
Gary''s Student
gsnu200709



" wrote:
I guess there are a couple of ways I could attack this problem. I
either need to be able to select cells that look blank but may not
actually be. Trying the 'goto/special/blanks' doesn't work even after
trying to paste special/values over the formulas in column C. Or I
need to be able to LEAVE the LAST duplicate cell in the list (i.e.
select all duplicate cells but the last one). This is what I have.


A B C
jeff 5
jeff 6
jeff 0 11
mike 3
mike 9 12


What's in column 'C' is a formula (=if(a1=a2,"",sumif(a$1:a2,a1,b
$1:b2)). I need someway to delete the rows that don't have a number
in column C.- Hide quoted text -


- Show quoted text -


Thanks for the reply. Can you explain how I would use this?




All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com