#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Looping

hi all

i want to loop through the currentRegion and do a different thing for
each col - this just gives me the same value in each one - i can see it
does that but cannot see how to move along !! arrgggh!!



For Each c In ActiveCell.CurrentRegion.Cells

'MsgBox c
sOut = sOut & "<note"
sOut = sOut & groupTitle & c & groupTitleEND
sOut = sOut & mapping & c & mappingEND
sOut = sOut & Description & c & DescriptionEND
sOut = sOut & budgetCode & c & budgetCodeEND
sOut = sOut & budgetCodePT & c & budgetCodePTEND
sOut = sOut & budgetCodeLU & c & budgetCodeLUEND
sOut = sOut & "</note"

Next

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Looping

You sure you're just not seeing the first part of the string.

For Each c In ActiveCell.CurrentRegion.Cells

'set it to "" to start
sOut = ""

'MsgBox c
sOut = sOut & "<note"
sOut = sOut & groupTitle & c & groupTitleEND
sOut = sOut & mapping & c & mappingEND
sOut = sOut & Description & c & DescriptionEND
sOut = sOut & budgetCode & c & budgetCodeEND
sOut = sOut & budgetCodePT & c & budgetCodePTEND
sOut = sOut & budgetCodeLU & c & budgetCodeLUEND
sOut = sOut & "</note"

'do something with sOut
c.value = sout '????

Next C 'cause I like it!

Buffyslay wrote:

hi all

i want to loop through the currentRegion and do a different thing for
each col - this just gives me the same value in each one - i can see it
does that but cannot see how to move along !! arrgggh!!

For Each c In ActiveCell.CurrentRegion.Cells

'MsgBox c
sOut = sOut & "<note"
sOut = sOut & groupTitle & c & groupTitleEND
sOut = sOut & mapping & c & mappingEND
sOut = sOut & Description & c & DescriptionEND
sOut = sOut & budgetCode & c & budgetCodeEND
sOut = sOut & budgetCodePT & c & budgetCodePTEND
sOut = sOut & budgetCodeLU & c & budgetCodeLUEND
sOut = sOut & "</note"

Next


--

Dave Peterson
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 David T Excel Discussion (Misc queries) 2 August 30th 06 10:51 PM
Looping Steve Excel Programming 2 September 9th 05 12:45 PM
Looping Syd[_4_] Excel Programming 1 December 11th 03 11:17 PM
Looping [email protected] Excel Programming 0 October 31st 03 07:47 PM
Need Looping Help [email protected] Excel Programming 2 October 29th 03 08:11 PM


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