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: 394
Default Loop Not Working

Hi everyone,

Why does this not work please. It is suppose to produce a list several
lines long but only produces 1 line.

For cmb = 1 To P
tly = 0
For idx = 0 To (2 ^ P) - 1
If BitCount(idx / 5000) = cmb Then
tly = tly + 1
End If
Next
Range("b32").Select
With ActiveCell
.Offset(0, 0).Value = "W"
.Offset(1, 0).Value = "For " & P & " numbers " & Format(tly,
"#,##0") & _
" different " & cmb & " num. "
.Offset(2, 0).Select
End With
Next

Thanks in Advance.
All the Best.
Paul

 
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
Why is this loop not working? Mike R. Excel Programming 12 July 25th 07 02:26 PM
Loop not working!! Simon Excel Programming 2 August 2nd 05 04:16 PM
Do...Loop not working Sunny Lin Excel Programming 1 April 14th 05 01:19 AM
for next loop not working Tom Ogilvy Excel Programming 0 September 27th 04 05:36 PM
for next loop not working Ron Rosenfeld Excel Programming 0 September 25th 04 04:07 AM


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