ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   using xml to specify ranges (https://www.excelbanter.com/excel-programming/348556-using-xml-specify-ranges.html)

medicenpringles[_32_]

using xml to specify ranges
 

i'm not sure if this is possible at all, but i have a whole slew of the
same xl spreadsheet with different data in them. my boss wants me to
create a single spreadsheet that consolidates all of that data. which
i have done. but recently that spreadsheet has been changed up some,
and so the ranges i copy from are slightly different. now, i could go
back and change each line of my code to different cells, BUT, i thought
of a great idea. Why not just create an XML file that specifies, in
order, which cells to copy from? then, i can specify versions of the
spreadsheet and use the appropiate version of the xml file.

problem is, i'm not too keen on XML in xl, and i have no idea how to
get started. what i have right now is something like this:

<?xml version="1.0" encoding="utf-8" ?
<Ranges
<Range page="1" name="Date" range="$C$6" /
<Range page="1" name="Net1" range="$C$7" /
<Range page="1" name="Manual Voids" range="$C$8" /
<Range page="1" name="Net2" range="$C$9" /
<Range page="1" name="WTDNet2" range="$C$11" /
<Range page="2" name="Non-Reset Grand Total" range="$D$9" /
</Ranges

but how i can use that in xl, or if i even can is beyond me. what i
would like to do is have some sort of looping code like:

Sub loop()
for each Range in Ranges
'copy and other actions
next range
end sub

this is probably way to far fetched, but i can dream

any help is appreciated,
sven


--
medicenpringles


------------------------------------------------------------------------
medicenpringles's Profile: http://www.excelforum.com/member.php...o&userid=16458
View this thread: http://www.excelforum.com/showthread...hreadid=494966



All times are GMT +1. The time now is 05:24 PM.

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