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


I am novice in vba so I will try to explain what I need and show yo
what I have.

I have about 200 rows in Column A of Sheet 1 (all number format, al
unique)

I want to have the code select the first number in the column (A2)

Then

Go to sheet 15 Column A to see if the number is there. If it isn'
there then put it in the next available row in Column A.

I want this to loop through all the 200 rows in Column A of Sheet 1 an
do the same thing.

Here is what I have so far, I know it is probably very tedious. M
problem is I don't know how to store the first activecell to referenc
to:

If Sheet1.Visible = xlSheetHidden Then
Sheet1.Visible = xlSheetVisible
End If
Sheet1.Activate
Range("A2").Select
If ActiveCell.Offset(0, 5).Value < "" Then
If Sheet15.Visible = xlSheetHidden Then
Sheet15.Visible = xlSheetVisible
End If
Sheet15.Activate
Range("A2").Select
Do
If ActiveCell.Value < FirstActiveCell.Value Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell.Value = FirstActiveCell.Value O
ActiveCell.Row = 1000
If ActiveCell.Row = 1000 Then
Range("A2").Select
Do
If IsEmpty(activcell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = FirstActiveCell.Valu

--
jhahe
-----------------------------------------------------------------------
jhahes's Profile: http://www.excelforum.com/member.php...fo&userid=2359
View this thread: http://www.excelforum.com/showthread.php?threadid=53058

 
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
use time functions inside if loop saedeepu Excel Worksheet Functions 2 September 17th 09 12:55 PM
Create an array inside a For...Next loop Eric Winegarner[_2_] Excel Programming 3 October 27th 05 12:26 AM
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
declaring active cell inside a for loop and offsetting from it l1075[_4_] Excel Programming 2 May 5th 04 08:40 PM


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