LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Difficult Loop


try something like this (I havent tested it)....

dim lngRow as long
dim lngCol as long
dim lngPasteRow as long
dim lngPasteCol as long
dim tempvalue

lngcol = 1
lngrow = 1
lngpastecol = 1
lngpasterow = 2

with sheets("Sheet1")

do until lngcol 8

tempvalue = sheets("Sheet2").cells(lngrow,lngcol)

if isdate(tempvalue) then
.cells(lngpasterow,lngpastecol) = tempvalue
lngpasterow = lngpasterow +1
end if

lngcol=lngcol+1

loop
end with

...no doubt people will say it's noddy - but its simple to understand.
You could do it with arrays, dictionaries, ranges or classes, but the
will all do the same thing

--
MattShoreso
-----------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...nfo&userid=347
View this thread: http://www.excelforum.com/showthread.php?threadid=53047

 
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
Help, too difficult for me. Menno Excel Worksheet Functions 4 January 19th 06 01:53 PM
Difficult but do-able? Jaydubs Excel Discussion (Misc queries) 8 October 6th 05 11:01 AM
Is this difficult??? mingolo Excel Programming 1 September 15th 05 07:03 PM
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM


All times are GMT +1. The time now is 03:54 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"