+ Reply to Thread
Results 1 to 1 of 1

using xml to specify ranges

  1. #1
    Registered User
    Join Date
    11-14-2004
    Location
    Georgia
    Posts
    57

    Lightbulb 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
    set rg = ws.range("{the current range's "range" data})
    next range
    end sub

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

    any help is appreciated,
    sven
    Last edited by medicenpringles; 12-20-2005 at 02:50 PM.
    Brought to you by Pringles and his infinite genius. ~''~

    "Ctrl+Z is a beautiful thing."
    - Me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1