Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default help with loops

Times up <g

use isempty to test if a cell is empty or ="" or len(trim(cell)) = 0

--
Regards,
Tom Ogilvy



Tom Ogilvy wrote in message
...
Any thoughts on what could be contained in a worksheet that would make

this
true:

IsNull(v(i, 1))

--
Regards,
Tom Ogilvy

mudraker wrote in message
...
I have removed the do loop & replaced it with a single command to find
the nextr blank cell on sheet 1 column c


Sub copyRange()

Dim v As Variant
Dim i As Integer
Dim intRow As Integer

v = Sheets(2).Range("C50:C70")

For i = LBound(v) To UBound(v)

If Not IsNull(v(i, 1)) Then
intRow = Sheets(1).Range("c65536").End(xlUp).Row + 1
Sheets(1).Cells(intRow, 3) = v(i, 1)
intRow = intRow + 1
End If

Next

End Sub


---
Message posted from http://www.ExcelForum.com/





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
loops???? harry buggy Excel Worksheet Functions 2 August 14th 07 06:33 PM
Using For - Next Loops in VB Biomed New Users to Excel 4 March 22nd 05 07:12 PM
Loops PaulSinki Excel Programming 3 December 10th 03 05:01 PM
LOOPS Fernando Duran Excel Programming 2 September 3rd 03 01:07 AM
Loops Tom Ogilvy Excel Programming 0 July 18th 03 05:20 PM


All times are GMT +1. The time now is 05:50 AM.

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

About Us

"It's about Microsoft Excel"