Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default How do I select all cells with a value less than 1?

I need to eliminate all cells with a value less than 1, but I don't know how.
Can anyone help explain this to me?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How do I select all cells with a value less than 1?

Hi,

Someone may have a worksheet solution but the only way i know is with a
macro. Right click your sheet tab, view code and paste this in and run it.
Beware it deletes data so try it on a test worksheet

Sub sonic()
Dim MyRange As Range
For Each c In ActiveSheet.UsedRange
If IsNumeric(c) And _
c.Value < 1 _
And c.Value < vbNullString Then
If MyRange Is Nothing Then
Set MyRange = c
Else
Set MyRange = Union(MyRange, c)
End If
End If
Next
MyRange.ClearContents
End Sub

Mike

"PointerMan" wrote:

I need to eliminate all cells with a value less than 1, but I don't know how.
Can anyone help explain this to me?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default How do I select all cells with a value less than 1?

Hi,

You may use Advanced filters. They are very well explained in the Help menu
--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"PointerMan" wrote in message
...
I need to eliminate all cells with a value less than 1, but I don't know
how.
Can anyone help explain this to me?

Thanks!


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default How do I select all cells with a value less than 1?

What do you mean by "eliminate"?

Does this mean to delete the contents of these cells, or to remove
them entirely (and to bring up cells which are further down the sheet
to take their place), or to delete the rows which contain these cells?

How is your data organised? All in one column, or spread over a few
columns?

More information, please.

Pete

On Dec 31, 1:27*pm, PointerMan
wrote:
I need to eliminate all cells with a value less than 1, but I don't know how.
*Can anyone help explain this to me?

Thanks!


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How do I select all cells with a value less than 1?

Hi,

Not enough detail. Are the cells all in one column? Do you want to clear
the cells? Or do you want to delete them? And if you want to delete them do
you want to delete the cells or the entire row they are on? Show us an
example of your data.

If all the cells are in one column and you want to delete their entire rows
then:

1. Select the column of data and choose Data, Filter, AutoFilter
2. Open the drop down for the autofilter and choose Custom
3. From the first box choose "less than" in the second box enter 1
4. Select all the visible cells in the column and press Ctrl+- (control
minus)
5. Either choose Entire Row or Shift cells up depending on whether you want
to remove the individual cells of the entire rows. Or press Del if you just
want to clear the cells.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"PointerMan" wrote:

I need to eliminate all cells with a value less than 1, but I don't know how.
Can anyone help explain this to me?

Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default How do I select all cells with a value less than 1?

Sorry for the lack of information. I have a spreadsheet with about 125
columns of data that I imported from Access. There are blank cells scattered
throughout the spreadsheet. When I look in a blank cell, it appears empty
but it won't get selected when I use the "Go To" function to select all the
blank cells. If I highlight the cell and hit the delete key, it'll show up
when I use the "Go To" function.

And yes, I essentially want to select the apparently empty cells and delete
their contents so that I can delete the cells and shift everything to the
left.


"Shane Devenshire" wrote:

Hi,

Not enough detail. Are the cells all in one column? Do you want to clear
the cells? Or do you want to delete them? And if you want to delete them do
you want to delete the cells or the entire row they are on? Show us an
example of your data.

If all the cells are in one column and you want to delete their entire rows
then:

1. Select the column of data and choose Data, Filter, AutoFilter
2. Open the drop down for the autofilter and choose Custom
3. From the first box choose "less than" in the second box enter 1
4. Select all the visible cells in the column and press Ctrl+- (control
minus)
5. Either choose Entire Row or Shift cells up depending on whether you want
to remove the individual cells of the entire rows. Or press Del if you just
want to clear the cells.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"PointerMan" wrote:

I need to eliminate all cells with a value less than 1, but I don't know how.
Can anyone help explain this to me?

Thanks!

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default How do I select all cells with a value less than 1?

Might be easier to simply know what is in those cells and delete them
that way with Find/Replace. Many times downloaded data is repetitive.

What comes through from Access in those almost-blank cells?
A space? 2 spaces?
Non-breaking spaces?
Is it always the same?
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How do I select all cells with a value less than 1?

Mayhaps the cells contain a space or spaces?

If that's the case you could use this macro to find and delete the extra
spaces.

The do your F5SpecialBlanks

Sub TRIM_EXTRA_SPACES()
Dim Cell As Range
For Each Cell In Selection
If (Not IsEmpty(Cell)) And _
Not IsNumeric(Cell.Value) And _
InStr(Cell.Formula, "=") = 0 _
Then Cell.Value = Application.Trim(Cell.Value)
Next
End Sub


Gord Dibben MS Excel MVP

On Fri, 2 Jan 2009 04:59:00 -0800, PointerMan
wrote:

Sorry for the lack of information. I have a spreadsheet with about 125
columns of data that I imported from Access. There are blank cells scattered
throughout the spreadsheet. When I look in a blank cell, it appears empty
but it won't get selected when I use the "Go To" function to select all the
blank cells. If I highlight the cell and hit the delete key, it'll show up
when I use the "Go To" function.

And yes, I essentially want to select the apparently empty cells and delete
their contents so that I can delete the cells and shift everything to the
left.


"Shane Devenshire" wrote:

Hi,

Not enough detail. Are the cells all in one column? Do you want to clear
the cells? Or do you want to delete them? And if you want to delete them do
you want to delete the cells or the entire row they are on? Show us an
example of your data.

If all the cells are in one column and you want to delete their entire rows
then:

1. Select the column of data and choose Data, Filter, AutoFilter
2. Open the drop down for the autofilter and choose Custom
3. From the first box choose "less than" in the second box enter 1
4. Select all the visible cells in the column and press Ctrl+- (control
minus)
5. Either choose Entire Row or Shift cells up depending on whether you want
to remove the individual cells of the entire rows. Or press Del if you just
want to clear the cells.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"PointerMan" wrote:

I need to eliminate all cells with a value less than 1, but I don't know how.
Can anyone help explain this to me?

Thanks!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
Select Cells Kevin Excel Discussion (Misc queries) 3 August 2nd 07 06:01 PM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
how do you "select locked cells" w/o "select unlocked cells"? princejohnpaulfin Excel Discussion (Misc queries) 3 July 16th 05 03:53 AM
Why aren't my cells highlighted when I select multiple cells? TChristian Setting up and Configuration of Excel 0 January 26th 05 10:23 PM


All times are GMT +1. The time now is 03:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"