Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default How to set a range equal to cells greater than 0 (Column "A" only)

Thank you!
Aex
--
Alex St-Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default How to set a range equal to cells greater than 0 (Column "A" only)

If row 65536 is free (Excel <=2003) -

Columns(1).Insert

Set myrange = Columns("B").SpecialCells(xlCellTypeConstants, xlNumbers)

myrange.Offset(0, -1).FormulaR1C1 = "=IF(RC20,1,"""")"
With myrange.Offset(0, -1)
.Value = .Value
End With

'Watch for the word wrap on next line-
Set myrange = myrange.Offset(0, -1).SpecialCells(xlCellTypeConstants,
xlNumbers).Offset(0, 1)
Columns(1).Delete

Debug.Print myrange.Address


--
---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)



"Alex St-Pierre" wrote in message
...
Thank you!
Aex
--
Alex St-Pierre



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default How to set a range equal to cells greater than 0 (Column "A" only)

Sorry, that should have been 'Column IV', not 'Row 65536'....


"Roger Whitehead" wrote in message
...
If row 65536 is free (Excel <=2003) -

Columns(1).Insert

Set myrange = Columns("B").SpecialCells(xlCellTypeConstants, xlNumbers)

myrange.Offset(0, -1).FormulaR1C1 = "=IF(RC20,1,"""")"
With myrange.Offset(0, -1)
.Value = .Value
End With

'Watch for the word wrap on next line-
Set myrange = myrange.Offset(0, -1).SpecialCells(xlCellTypeConstants,
xlNumbers).Offset(0, 1)
Columns(1).Delete

Debug.Print myrange.Address


--
---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)



"Alex St-Pierre" wrote in message
...
Thank you!
Aex
--
Alex St-Pierre





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
"Count non blanks" if cells don't equal certain values thegymshoe Excel Worksheet Functions 6 June 23rd 09 08:29 PM
sort data rows "greater than or equal" criteria in another cell HV man Excel Worksheet Functions 0 March 26th 06 11:50 PM
Lookup "greater than or equal to" in lookup array icemouse New Users to Excel 3 February 16th 06 10:07 PM
Unableto access "greater than or equal to" Where is it? ddewdrops522 Excel Discussion (Misc queries) 2 January 13th 06 11:01 PM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


All times are GMT +1. The time now is 08:16 PM.

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"