+ Reply to Thread
Results 1 to 3 of 3

Recorded macro not giving the same result as the by-hand result

  1. #1
    Registered User
    Join Date
    02-14-2010
    Location
    Preston England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Recorded macro not giving the same result as the by-hand result

    I should like to master the vba code for drawing a graph but I hit a problem :

    On my practice worksheet I have a sine function. In column 5 degrees of arc from 1 to 359, in col 6 the sine function.

    (1) First I make a graph by hand INSERT > Scatter > select the smooth line option. This then draws a nice sine wave on my worksheet. This is what I want, but I need to use vba to do the same thing.

    (2) Rub out the chart I just made.

    (3) Do exactly the same thing as in (1) but with the macro recorder on. Stop recording and then run the macro.

    (4) Now, a different chart appears with two straight lines on it. Not a sine wave as expected.

    The code from the recorded macro was

    Please Login or Register  to view this content.
    What to do, please ?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    12,256

    Re: Recorded macro not giving the same result as the by-hand result

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    19,234

    Re: Recorded macro not giving the same result as the by-hand result

    try

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ 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] IF(OR function keeps giving #VALUE! result
    By GHBrodbeck in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-27-2018, 08:42 PM
  2. Replies: 7
    Last Post: 11-27-2015, 11:12 AM
  3. Macro giving wrong result for counting rows
    By aniletc37 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-11-2014, 07:57 AM
  4. Result of recorded macro is different from hand work
    By petrb142 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2014, 08:41 AM
  5. [SOLVED] Simple =Sum(B2:L2) result is not giving accurate result and =IMSUM(M2,O2) also.
    By SimonsGE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-29-2013, 01:56 AM
  6. Vlookup always giving n/a as result
    By ankit_85 in forum Excel General
    Replies: 4
    Last Post: 09-11-2010, 01:28 AM
  7. Recorded macro doesn't seem to provide expected result
    By Jeroen1000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-21-2009, 06:52 AM

Tags for this Thread

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