View Single Post
 
Old 10-23-2013, 08:32 AM
BobBridges's Avatar
BobBridges BobBridges is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

I don't know that you were unclear; I got it right eventually. I think I just read unclearly.

Ok, then forget VBA (unless of course you want to learn more about it for other reasons). For export, I think it's easy enough to use Excel formulae to create that string, just concatenating the various pieces, then manually cut-and-paste into the text file. I've made a sample—a preliminary and unsatisfactory sample—in the attached workbook. It will need some tweaking to do everything you need, but it should show you how I think you might go about it. What it doesn't do, yet, is:

  • Handle the bit about ads. That's because I can't see what your sample workbook does to indicate it. If that datum isn't in the workbook, then it'll have to be if you want your workbook to know how to create the string that goes into the web page. That's assuming you don't want the ad to be part of every price, because you showed multiple samples; some mention ads, some don't.
  • Know when to stop. Does every item have the same number of columns? I'm guessing not; so there needs to be some way of the workbook formulae knowing how many columns to use for each item.
  • Correctly display the top number of the highest quantity. In your worksheet you show just 250, 500, 1000, 2500, but your web page says 250-499, 500-999 and so on. Excel can easily enough see what the top number of most of them should be; it's just one less than the next qt. But for that last one, should it say "2500-5000", or "2500-?", or "2500+", or what? Note the problem in the last column of my sample, M1.
Seems to me there was another thing missing, too, but I don't remember just now. Oh, wait, I know:
  • Your sample showed a single item taking up two lines in the spreadsheet. But I don't suppose you use one worksheet for each item; how do you handle multiple items? I think I need to see an actual workbook attached, so I can see what the format is. Feel free to sanitize it first, if you're afraid of giving away anything confidential; but I want to see an example that contains more than one item.
Attached Files
File Type: xlsx daysample.xlsx (9.1 KB, 13 views)
Reply With Quote