ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   looping through current region (https://www.excelbanter.com/excel-programming/352075-looping-through-current-region.html)

buffyslay

looping through current region
 

sorry to post again - but problem is a bit different now

i need a different wrap tag for each column.....but cannot see how t
move it along?

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"

Nex

--
buffysla
-----------------------------------------------------------------------
buffyslay's Profile: http://www.excelforum.com/member.php...nfo&userid=357
View this thread: http://www.excelforum.com/showthread.php?threadid=50725


buffyslay

looping through current region
 

sorry - posted first one on google - didnt think about this one (sorry
for clogging up servers etc)


--
buffyslay
------------------------------------------------------------------------
buffyslay's Profile: http://www.excelforum.com/member.php...fo&userid=3573
View this thread: http://www.excelforum.com/showthread...hreadid=507257


Dave Peterson

looping through current region
 
select case c.column
case is = 1: sOut = sOut & "<note"
case is = 2: sOut = sOut & "<notnote"
end select
....

select case c.column
case is = 1: sOut = sOut & "</note"
case is = 2: sOut = sOut & "</notnote"
end select

buffyslay wrote:

sorry to post again - but problem is a bit different now

i need a different wrap tag for each column.....but cannot see how to
move it along?

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

--
buffyslay
------------------------------------------------------------------------
buffyslay's Profile: http://www.excelforum.com/member.php...fo&userid=3573
View this thread: http://www.excelforum.com/showthread...hreadid=507257


--

Dave Peterson


All times are GMT +1. The time now is 10:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com