Filehost.ro - gazduire fisiere
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
ro_xy20 Profile
Femeie
24 ani
Bucuresti
cauta Barbat
24 - 45 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] VBA To Quickly Select Blank Rows in Selection Pagini: 1 Moderat de TRaP, TonyTzu
#1
TRaP
Moderator
Postari: 959
I use the following code to quickly select blank rows in a selection:


Sub Sel_Blank_Rows()
    Selection.SpecialCells(xlCellTypeBlanks).Select
End Sub


 
   
pus acum 3 zile#2
TRaP
Moderator
Postari: 959
This is the same as going to Home - Find & Select - Go to special (or pressing F5-Special/Fn+F5-Special) - Blanks - OK.

It doesn't work for cells that "appear" blank.

For those that return "No cells were found", you need to get a bit creative:

1. Select the range of cells containing blanks.

2. Press CTRL+F to open Find and Replace dialog

3. Leave the "Find what" field empty, and select "Match entire cell contents"

4. Press the Find All button
- in the list that appears below the buttons in the dialog you will have the references to all cells matching.

5. Press CTRL+A to select all matching cells

6. Close the Find and Replace dialog.
- it might appear that the cells are not selected, but it just means the excel file has lost focus
- click on the top bar of the file to bring it to focus and all your blank cells will be selected

7. Press the Delete button on your keyboard to make them blank for the Special cells selection.

8. Go to Home - Find & Select - Go to special (or press F5-Special/Fn+F5-Special) - Blanks - OK.

Now, depending on the reason you wanted to select the blank cells in the first place, you can now delete the rows or fill in the blanks by e.g. pressing =, then adding the first cell above your selection, and pressing CTRL+ENTER.

E.g., I selected range F6:F500 and after I got the blanks truly blank in step 7 and did step 8, I entered =F7 and pressed CTRL+ENTER to fill the blank cells with the non-blank cells in the range. F7 was the cell above my first blank cell in the selection.

Source:
https://stackoverflow.com/a/15995214


 
   
Pagini: 1  
Mergi la