![]() |
|
|
|||||||
| 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 |
|
Join Date: Sep 2004
Location: WV, USA
Posts: 696
|
Hello all,
Since quite a few days, I'm (and my office) having strange problems dealing with blanks. 1. I had a few numbers copy and pasted (special) from some formula in a column and in between it had blanks. I checked the lengths of the cells and they were zero, so they were blanks. However, when I tried to use Ctrl + Down key, it was jumping very weird, somehow it was just ignoring the blanks. Then I clicked inside a blank cell and then came out of it, tried Ctrl +Down again, it stopped for that cell but ignored other blanks. 2. I had some other numbers and blanks in a column, I used CountA to count the number of non-blank cells, again the same problem. It was counting blank cells too, but when I clicked inside a cell the count was reducing and it wasn't working for all the blank cells. Some blank cells even after clicking inside were still counted. Sorry for such a long description but I had to explain. So has anybody faced similar kind of problem ever?
__________________
If you've exhausted all the possibilities, remember this; you haven't! <a href = "http://www.nandeshwar.info">My home page</a> My Excel/VBA Blog |
|
|
|
|
|
#2 |
|
MrExcel MVP
Moderator Join Date: May 2003
Location: Boulder Creek, CA
Posts: 20,903
|
Just a thought, but highlight that column, then Data-->Text to Columns-->Filter in place (destination should be the same as the source range).
HTH, Smitty
__________________
Smitty Every once in a while, there's a sudden gust of gravity... Microsoft Excel MVP |
|
|
|
|
|
#3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,653
|
Quote:
******** ******************** ************************************************************************>
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.
__________________
Windows XP Pro/Office 2003 SP2 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
#4 | |
|
Join Date: Dec 2002
Location: Tempe, Arizona
Posts: 323
|
Quote:
__________________
Started building macros in Lotus 123, then Quattro Pro and now program in Excel VBA. Gaynard Nelson The race is not always to the swift But to those who keep on running |
|
|
|
|
|
|
#5 |
|
Join Date: Sep 2004
Location: WV, USA
Posts: 696
|
gaynard_nelson: No I checked it very closely, there was nothing in "blank cells"
Mark W.: Thanks, I wasn't aware of that. But why even after you copy and paste special it-you don't see anything there but still ISBLANK is False? Smitty: Thanks, I'll try that. Thanks all for your replies. I know what the problem is now, but what is solution how do we overcome it, if we've many rows. May be we can write macro, let me see.
__________________
If you've exhausted all the possibilities, remember this; you haven't! <a href = "http://www.nandeshwar.info">My home page</a> My Excel/VBA Blog |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,653
|
Quote:
Now to really mess you up... COUNTBLANK returns 1. Consult the Excel Help topic for these functions to understand these distinctions.
__________________
Windows XP Pro/Office 2003 SP2 |
|
|
|
|
|
|
#7 |
|
Join Date: Sep 2004
Location: WV, USA
Posts: 696
|
Thanks for reply Mark.
I wrote this macro to create true blanks. Code:
Sub make_true_blanks()
Dim c As Range
For Each c In Selection
If Len(c) = 0 And WorksheetFunction.IsText(c) Then
c.ClearContents
End If
Next
MsgBox "Done!"
End Sub
__________________
If you've exhausted all the possibilities, remember this; you haven't! <a href = "http://www.nandeshwar.info">My home page</a> My Excel/VBA Blog |
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,653
|
Also, you could have selected any single, column verticle array, and used Excel's Data | Text to Columns... menu command to parse the values eliminating any empty (null) text strings, leading/trailing spaces, and for numeric values -- leading zeroes.
__________________
Windows XP Pro/Office 2003 SP2 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|