Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 10-23-2013, 04:55 AM
daymaker daymaker is offline Merging excel values to text file Windows XP Merging excel values to text file Office 2000
Novice
Merging excel values to text file
 
Join Date: Feb 2012
Posts: 22
daymaker is on a distinguished road
Default


Hi Bob. The main function we're after is to take pricing that we have in a spreadsheet (third image of orig. post) and turn it into the character strings (one per product) that we will then upload into the website. My apologies if I was unclear on this point....
Reply With Quote
  #17  
Old 10-23-2013, 08:32 AM
BobBridges's Avatar
BobBridges BobBridges is offline Merging excel values to text file Windows 7 64bit Merging excel values to text file 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, 11 views)
Reply With Quote
  #18  
Old 10-23-2013, 01:23 PM
daymaker daymaker is offline Merging excel values to text file Windows XP Merging excel values to text file Office 2000
Novice
Merging excel values to text file
 
Join Date: Feb 2012
Posts: 22
daymaker is on a distinguished road
Default

Quote:
Originally Posted by BobBridges View Post
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.

We can put 'NO AD' & 'WITH AD' text in the price table & include it in concatenation.


Every item does not have same # of columns or same qty breaks.


Regarding top qty, we can put whatever we want there, can't we? Whether it be an actual # like 9999, or a plus sign, etc.? (Your M1 had a -1 instead of a + as originally posted.)



Quote:
Originally Posted by BobBridges View Post
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.
And probably best to just forget about the H1 - M1 step; I was providing you too much information & options at that time.

Attached are two spreadsheets. 'Pricing sample.xlsx' is an abbreviated pricing table example that we would use to calculate pricing. The legend within that will explain a bit about the data; the 1-4 categories correspond with different pricing seasons we have within the selling year. Let's say we are currently in pricing season 3 and getting ready to go into pricing season 4. We need to create character strings just like those in 'Miva pricing string sample.xlsx', but with the pricing values from the '4' rows (rather than the values of the '3' rows as they are currently).
Attached Files
File Type: xlsx Pricing sample.xlsx (52.7 KB, 8 views)
File Type: xlsx Miva pricing string sample.xlsx (9.4 KB, 8 views)
Reply With Quote
  #19  
Old 10-24-2013, 12:45 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Merging excel values to text file Windows 7 64bit Merging excel values to text file Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,776
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

@ daymaker

Forum threads are easier to read when quotes are limited to a minimum. If you are just answering the previuos post, perhaps quote a couple of words instead of entire paragraphs. After all you and Bob are the only posters so far, so it's easy to follow the thread with a minimum of quotes
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Loss of formulae values when mail merging excel to word MellowMel Mail Merge 6 05-09-2014 09:08 AM
Merging excel values to text file How to convert a text file to an Excel file with the data format automatically? mradmin Excel 6 10-16-2013 10:34 AM
Merging excel values to text file Handle Text / Numeric values in SSRS while Export To Excel achuki Excel 5 02-07-2012 02:14 PM
How Do I Put Text Values Into A CSV That Excel Will Leave Along? eBob.com Excel 2 05-04-2011 07:01 AM
Merging excel values to text file Merging two Word files with one file having a text box Timothy2001 Word 3 01-23-2011 07:01 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft