Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Any excel gurus out there? Converting mixed length numeric to fixed length

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
NewJeffCT Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Dec-06-06 10:44 AM
Original message
Any excel gurus out there? Converting mixed length numeric to fixed length
I have several excel spreadsheets where I am trying to compare my data to test data. I have been dealing with a very nice programmer who says she can whip up a quick program to help me match the files (some of which can be thousands of lines long, as I'm drawing from an almost 5 million line Access database)

However, one thing that is causing her problems is that on her end, the numeric value column of the data is a fixed length – (not sure how it works, but maybe 555.55 would be 000000555.55) while in my excel spreadsheets, the numbers are just regular numbers – meaning 555.55 would be six characters long – including the decimal, while 123456.78 would be nine characters long.

I’m almost positive there is a way to do it, but I’m drawing a blank right now. Is there a way to convert my column of variable length numbers to a set fix length, i.e. 12 characters or xxxxxxxxx.xx or similar?

Thanks
Printer Friendly | Permalink |  | Top
Yavin4 Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Dec-06-06 11:02 AM
Response to Original message
1. Your Programmer Should Write That Code
When she reads in the numbers from your Excel, she should write some code to convert the numbers int the right format. You should not mess with your Excel data because you may lose some of it. Practically all programming languages have built-in code to convert numbers into different formats.
Printer Friendly | Permalink |  | Top
 
NewJeffCT Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Dec-06-06 11:05 AM
Response to Reply #1
2. she can do that
but, from what she says, it is very complicated using the program she is using.
Printer Friendly | Permalink |  | Top
 
LynzM Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Dec-06-06 11:34 AM
Response to Original message
3. Within excel, you can define a fixed format
Select the data you want to reformat. Go to format --> cells, and choose custom (bottom of the list). Pick the one that looks closest to what you want (probably 0.00) and then edit it to (0000000.00) or whatever. This will add the zeros to the front.
Printer Friendly | Permalink |  | Top
 
NewJeffCT Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Dec-06-06 11:47 AM
Response to Reply #3
4. thanks - I knew it was easy
If this was 10 years ago, i probably could do that in my sleep. But, alas, I'm old now.
Printer Friendly | Permalink |  | Top
 
LynzM Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Dec-06-06 01:04 PM
Response to Reply #4
5. LOL, no worries, dude....
It just so happens that I work with data and databases, so... yeah. :) :hi:
Printer Friendly | Permalink |  | Top
 
Yavin4 Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Dec-06-06 01:42 PM
Response to Reply #4
6. I Strongly Suggest Making a Backup Copy of Your Excel Data
before you re-format the cells.
Printer Friendly | Permalink |  | Top
 
NewJeffCT Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Dec-06-06 01:49 PM
Response to Reply #6
7. too late for that
Though, I still have the original Access DB, if necessary.
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Fri May 03rd 2024, 12:16 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC