Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how do I find out if the selected cells have no content ie. no text,
charts, links etc? Chimanro |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if application.counta(selection) = 0 then
would be a start. Cells can't contain charts, so I don't see that as an issue. -- Regards, Tom Ogilvy "Chimanrao" wrote in message oups.com... how do I find out if the selected cells have no content ie. no text, charts, links etc? Chimanro |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Take a look at IsEmpty or IsNull as a way to determine presence of content
in a Cell e.g. If IsEmpty(Range("A1")) then MsgBox "A1 is Empty" -- Cheers Nigel "Chimanrao" wrote in message oups.com... how do I find out if the selected cells have no content ie. no text, charts, links etc? Chimanro |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just some added information:
IsNull has no play in this situation that I can see. IsEmpty is only pertinent to a single cell (selection can be multiple cells and the OP does say cells with an s) - So a loop might be required to use IsEmpty -- Regards, Tom Ogilvy "Nigel" wrote in message ... Take a look at IsEmpty or IsNull as a way to determine presence of content in a Cell e.g. If IsEmpty(Range("A1")) then MsgBox "A1 is Empty" -- Cheers Nigel "Chimanrao" wrote in message oups.com... how do I find out if the selected cells have no content ie. no text, charts, links etc? Chimanro |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Agreed Tom, I was building on your example to show another method albeit for
Cell (singular without the s). IsNull was a nonsense suggestion I agree ! -- Cheers Nigel "Tom Ogilvy" wrote in message ... Just some added information: IsNull has no play in this situation that I can see. IsEmpty is only pertinent to a single cell (selection can be multiple cells and the OP does say cells with an s) - So a loop might be required to use IsEmpty -- Regards, Tom Ogilvy "Nigel" wrote in message ... Take a look at IsEmpty or IsNull as a way to determine presence of content in a Cell e.g. If IsEmpty(Range("A1")) then MsgBox "A1 is Empty" -- Cheers Nigel "Chimanrao" wrote in message oups.com... how do I find out if the selected cells have no content ie. no text, charts, links etc? Chimanro |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could also try the specialcells method. For example
Range("A1:A10").SpecialCells(xlCellTypeBlanks).Add ress returns the adresses of the blanks within the range a1:a10 Cheers Andy "Nigel" wrote: Agreed Tom, I was building on your example to show another method albeit for Cell (singular without the s). IsNull was a nonsense suggestion I agree ! -- Cheers Nigel "Tom Ogilvy" wrote in message ... Just some added information: IsNull has no play in this situation that I can see. IsEmpty is only pertinent to a single cell (selection can be multiple cells and the OP does say cells with an s) - So a loop might be required to use IsEmpty -- Regards, Tom Ogilvy "Nigel" wrote in message ... Take a look at IsEmpty or IsNull as a way to determine presence of content in a Cell e.g. If IsEmpty(Range("A1")) then MsgBox "A1 is Empty" -- Cheers Nigel "Chimanrao" wrote in message oups.com... how do I find out if the selected cells have no content ie. no text, charts, links etc? Chimanro |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can select the background cells of a chart and press ctrl + c and
the chart also gets copied. When I do GetSelection() in this case I get a Range object. In this case all the cells can be empty but a chart object does exist in the selection. The the second scenario is when the user selects the chart object by clicking on it. In this case when I use GetSelection i get a object but its not of type range. which type is this object of? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Test for an empty selection | Excel Programming | |||
Finding the first empty row with VBA | Excel Programming | |||
List Selection to First Empty Row | Excel Programming | |||
Selection of non-empty cells | Excel Programming | |||
Finding last row that is empty | Excel Programming |