+ Reply to Thread
Results 1 to 9 of 9

Different value before and after the Macro

  1. #1
    Registered User
    Join Date
    11-12-2010
    Location
    são paulo, brazil
    MS-Off Ver
    Excel 2007
    Posts
    25

    Different value before and after the Macro

    Hi, Everyone!

    I created a macro that exports data from SAP in .xls format but my problem is when opening the .xls file where the column "H" the volars return modified.
    Example: cell H23 = 1.833 (before opening macro) -> H23 = 1.833 (after opening macro)
    In this case I cannot use sumif formula correctly.

    Could Somebody help me?

    Regards,
    Rafael

    EXTRATOR_TESTE.xlsm
    123.xls

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Different value before and after the Macro

    Quote Originally Posted by rafa.jsilva View Post
    I created a macro that exports data from SAP in .xls format but my problem is when opening the .xls file where the column "H" the volars return modified.
    SAP is one of the most sophisticated ERP systems in the world, so you can probably test other export methods by sending the data out in many other formats (csv, txt, etc...)

    Quote Originally Posted by rafa.jsilva View Post
    Example: cell H23 = 1.833 (before opening macro) -> H23 = 1.833 (after opening macro)
    what do you mean the value is different before and after opening the macro? your words in the above post show the same number in the same cell. not understanding that.

  3. #3
    Registered User
    Join Date
    11-12-2010
    Location
    são paulo, brazil
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Different value before and after the Macro

    Hi, vba_php!

    cell H23 = 1,833 (before opening macro) is when I open the file whithout macro and the value has comma.
    cell H23 = 1.833 (after opening macro) is when I open the file with macro and the value show with dot.

    When I work with macro my result isn't good and when I open the file manually and paste in file my result is enough.
    Attachment 696269
    Attachment 696270

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Different value before and after the Macro

    HI!

    I cannot view the attachments because of the way you uploaded them. i have no idea what you guys do to make that happen. upload them another way, by pressing the ""go advanced"" button at the bottom of your post and select ""manage attachments"", the hyperlink on that page. thanks. see the image below for what I see when trying to view your attachments:
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    11-12-2010
    Location
    são paulo, brazil
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Different value before and after the Macro

    I got save the file extrator_teste only in .xls, when you to open change to .xlsm.

    Please, try again to do download.

    EXTRATOR_TESTE.xls
    123.xls
    wrong result.JPG
    right result.JPG

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Different value before and after the Macro

    i cannot replicate your issue, so I don't think I'm going to be much help here. sorry.

    if you want to give more details about your issue, record a video as proof that the number you're speaking of does indeed change before and after macro. in other words, a video of you opening the file and running the macro. to record a video in windows 10, see here:

    https://www.google.com/search?q=wind...+bar+recording

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Different value before and after the Macro

    Pl attach files as shown in yellow line at the top of the page.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: Different value before and after the Macro

    Sounds like an issue with your regional settings. Perhaps try:

    Please Login or Register  to view this content.
    in your second macro.
    Everyone who confuses correlation and causation ends up dead.

  9. #9
    Registered User
    Join Date
    11-12-2010
    Location
    são paulo, brazil
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Different value before and after the Macro

    Hi, Rorya!

    The local:=true worked

    Thank you.
    Rafael

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Dynamic macro name / Concatenating macro name / Call a string variable as a macro name
    By vwhite in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-18-2020, 03:36 AM
  2. [SOLVED] macro showing error ( macro not found ) while trying to execute macro every 1 minute
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2018, 07:58 PM
  3. [SOLVED] Define variable in macro than calling that macro inside another macro
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2015, 10:58 AM
  4. [SOLVED] Macro to show Which macro didnt work in a nested macro
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-10-2013, 03:21 AM
  5. Perform macro "on open" specific file- store macro in Personal Macro Workbook?
    By thompssc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2012, 12:38 PM
  6. lookup macro, solver macro, realtime macro
    By xelhelp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2011, 06:14 PM
  7. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 AM

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