Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default Looping Data = TRUE to a MsgBox

Could someone provide an example of Looping thru a range of 20 records
and where say 5 records = True, and 15 = False; On completion a Msgbox
would Pop-up
stacking the results as follows:

TrueCell1.Address TrueCell1.Value << ... & Chr (10) &... is involved
here (I think).
TrueCell2.Address TrueCell2.Value
TrueCell3.Address TrueCell3.Value
TrueCell4.Address TrueCell4.Value
TrueCell5.Address TrueCell5.Value

Sorry not to have all required data, but any
help would be appreciated.

TIA,


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Looping Data = TRUE to a MsgBox

sStrTrue = " - True - " & vbNewLine
sStrFalse = " - False - " & vbNewLine
for each cell in Range("A1:A20")
if cell.Value then
sStrTrue = sStrTrue & cell.Address & " " & cell.Value & vbNewLine
else
sStrFalse = sStrFalse & cell.Address & " " & cell.Value & vbNewline
End if
Next
msgbox sStrTrue & sStrFalse

if you want them spaced exactly in columns, that would take a bit more work.

--
Regards
Tom Ogilvy

"JMay" wrote in message
news:X_TId.34804$jn.25212@lakeread06...
Could someone provide an example of Looping thru a range of 20 records
and where say 5 records = True, and 15 = False; On completion a Msgbox
would Pop-up
stacking the results as follows:

TrueCell1.Address TrueCell1.Value << ... & Chr (10) &... is involved
here (I think).
TrueCell2.Address TrueCell2.Value
TrueCell3.Address TrueCell3.Value
TrueCell4.Address TrueCell4.Value
TrueCell5.Address TrueCell5.Value

Sorry not to have all required data, but any
help would be appreciated.

TIA,




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
Looping through data on consecutive pages markvi Excel Discussion (Misc queries) 2 June 28th 07 09:46 PM
Function to return True/False if all are validated as True by ISNU Tetsuya Oguma Excel Worksheet Functions 2 March 15th 06 10:28 AM
looping through and organizing a large amount of data Erik Excel Programming 4 September 6th 04 05:05 PM
msgbox data Mike[_78_] Excel Programming 2 April 17th 04 09:22 AM
Looping Macro to remove data where value is 0 Paul Excel Programming 3 January 10th 04 08:08 AM


All times are GMT +1. The time now is 09:39 AM.

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

About Us

"It's about Microsoft Excel"