+ Reply to Thread
Results 1 to 10 of 10

Thread: Data from SAP

  1. #1
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    111

    Data from SAP

    At work i use a lot of data that is from SAP. Unfortunately, there seems to be something wrong with the formating of the data. If i use isnumber on one of the cells containing a number, i get false.

    This messes with my lookups and other formulae.

    Is there a way i need to condition my data when it's coming from SAP?

    Thanks
    Last edited by thedon_1; 03-16-2011 at 06:32 AM.

  2. #2
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    537

    Re: Data from SAP

    You may want to post up a small sample workbook so we can see what you are up against...make sure it has some raw data straight from SAP so the formatting is the same as what you normally see and have to deal with.
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  3. #3
    Forum Guru Domski's Avatar
    Join Date
    12-14-2009
    MS-Off Ver
    What does it matter?
    Posts
    3,933

    Re: Data from SAP

    I work with data from SAP HR. A lot of the the ID's and other fields whilst appearing to be numeric actually export to Excel as text. It's one of those things you just have to get used to I think.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    111

    Re: Data from SAP

    Ok cool.

    Here's 2 lists of data, there's a lookup formula in there demonstrating how wrong some of the results can be.

    I tried using the trim function on the SAP data but it doesn't really help with.
    Attached Files Attached Files

  5. #5
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127

    Re: Data from SAP

    Enter 1 in an empty cell - Copy - Select all your data - Right Click - Paste Special - Select Multiply - OK - Text is now nubers

    To apply LOOKUP you will have to sort your data first
    Quoting entire posts clutters the forum and makes threads hard to read !

    If you are pleased with a member's answer then use the Star icon to rate it

    Click here to see forum rules

  6. #6
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,593

    Re: Data from SAP

    I agree with Dom

    This can sometimes help.
    Select the Data to convert

    Text to Columns > Delimited > Finish
    This should convert text to numbers.
    Then format the cells to suit the number of digits you need to display
    e.g.
    Format Cells.... Number > Custom
    Type:= 00000000

    Hope this helps
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

  7. #7
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    537

    Re: Data from SAP

    Quote Originally Posted by Domski View Post
    I work with data from SAP HR. A lot of the the ID's and other fields whilst appearing to be numeric actually export to Excel as text. It's one of those things you just have to get used to I think.

    Dom
    Yup, the numbers are actually formatted as text.


    Edit: I was too slow.....
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  8. #8
    Forum Guru Domski's Avatar
    Join Date
    12-14-2009
    MS-Off Ver
    What does it matter?
    Posts
    3,933

    Re: Data from SAP

    I have a macro like this in my Personal.xls to consistently convert lists to text value with a set number of leading zeros:

    Sub Convert_Nums()
    
    Dim myRange As Range
    Dim strFormat As String
    Dim intFormat As Integer
    
    intFormat = InputBox("How many characters?")
    strFormat = WorksheetFunction.Rept("0", intFormat)
    
    Selection.NumberFormat = "@"
    
    For Each myRange In Selection
        If myRange <> "" Then
            myRange = Format(myRange.Value * 1, strFormat)
        End If
    Next myRange
    
    End Sub

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  9. #9
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    111

    Re: Data from SAP

    Perfect guys, works now, thanks so much for the help.

  10. #10
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127

    Re: Data from SAP

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Quoting entire posts clutters the forum and makes threads hard to read !

    If you are pleased with a member's answer then use the Star icon to rate it

    Click here to see forum rules

+ 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.2.0