Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bernard
I have solved the problem I had with this I had two shets called 2Orders" and "Results - my final code reads - Sub Rectangle7_Click() orders.Activate lastcell = Cells(Cells.Rows.Count, "A").End(xlUp).Row For j = 1 To lastcell If Cells(j, 7) = "" Then k = k + 1 Rows(j & ":" & j).Copy Sheets("Results").Cells(k, 1) End If Next j End Sub Many Many thanks for all your help! "Bernard Liengme" wrote: This look for blanks in column G and copyies entrie row to Sheet3 Sub ListEmpty() Sheets("Sheet2").Activate lastcell = Cells(Cells.Rows.Count, "A").End(xlUp).Row For j = 1 To lastcell If Cells(j, 7) = "" Then k = k + 1 Rows(j & ":" & j).Copy Sheets("Sheet3").Cells(k, 1) End If Next j End Sub best wsihes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "vbnewbie" wrote in message ... Thanks for this Bernard it's a good start but I need to display the whole contents of the row, not just the row numbers, also in a text file rather than on another sheet. Hope you can help, or anyone else out there? Cheers "Bernard Liengme" wrote: I am assuming: (1) the column is A, and (2) you want to start at row 1. This subroutine looks at column A on Sheet2 and on Sheet3 in column A it lists the row number of every empty cell. The Sheet3 could be copied to a text file or saved as a TXT file. best wishes Sub ListEmpty() Sheets("Sheet2").Activate lastcell = Cells(Cells.Rows.Count, "A").End(xlUp).Row For j = 1 To lastcell If Cells(j, 1) = "" Then k = k + 1 Sheets("Sheet3").Cells(k, 1) = j End If Next j End Sub -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "vbnewbie" wrote in message ... I am trying to read all empty cells in a column then append the rows that the cells are in to a text file using VB6 Microsoft EXCEL 2003 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find first empty cell in column | Excel Discussion (Misc queries) | |||
How to: Find first empty cell in column | Excel Worksheet Functions | |||
Delete Rows with Empty Cells with empty column 1 | Excel Programming | |||
Find a empty cell in next column | Excel Discussion (Misc queries) | |||
How to find next empty cell within a column? | Excel Programming |