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 Do Until Help

private sub absent_click()

dim absentcell as range
dim row as integer
row = 61

activeworkbook.sheets(\"aerobics\").activate

range(\"g61\").select

do

do

if activecell.value = a then

activecell.offset(1, 0).select

row = row + 1

end if

loop until activecell.value < a

set absentcell = activecell

activecell.offset(0, -2).select

selection.copy

range(\"b98\").select

do

if activecell.value < \"\" then

activecell.offset(1, 0).select

end if

loop until activecell.value = \"\"

selection.pastespecial paste:=xlpastevalues, operation:=xlnone
skipblanks _
:=false, transpose:=false
application.cutcopymode = false

absentcell.select

activecell.value = \"absent\"

loop until row 90

end sub

__________________________________________________ __________________________________________________ __________________________________________________ ______

The function should do as follows:

Go to top of table (cell G61).

If the cell has "a" in, put the cell 2 spaces to the left into anothe
table (B98). Otherwise, move down a cell.
Repeat until you move further than row 90.

The function works perfectly, except it doesn't stop searching when i
reaches row 90, which is what I would expect since I + 1 to the ro
integer each time the offset moves down a row.

Any help would be very helpful
;)

Thanks :confused

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

 
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



All times are GMT +1. The time now is 11:53 PM.

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"