+ Reply to Thread
Results 1 to 3 of 3

Need help sorting macro that's causing an error

  1. #1
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Need help sorting macro that's causing an error

    Hi all,

    I've been trying to created a workbook to store contact information! "File attached"

    I have 3 sheets, well 2 sheets really that related to this error, a database sheet and an interface where I can load contact information, when running the macro to update a contact, it generates an error on another macro that refreshes the database! Not sure I am explaining myself well, bellow is the code that generates the error, line 6 .Range("D28:O".............

    Hope someone can assist me with this as I am out of ideas why this error happens! and also it seems to be causing the contact data to shift one row to the right on the contact database

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by tfilipe; 06-21-2018 at 03:07 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Need help sorting macro that's causing an error

    That line of code isn't causing the data to shift, it is erroring there as a result of the data shifting earlier in it code. It errors on that line because the start date in J2 is no longer a date. So it can't copy that cell value.

    I don't know where that data shift actually occurs. I'm guessing you either don't have your "data map" set up correctly in column AB on the interface sheet, or you don't implement the data map correctly in the code.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Need help sorting macro that's causing an error

    Thanks for your comment Alpha, got it fixed!

+ 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. Any guess on why this macro is causing a subscript out of range error?
    By 80Wil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-21-2017, 07:07 PM
  2. [SOLVED] Constant value causing #value! error????
    By MARKSTRO in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-29-2014, 12:57 PM
  3. [SOLVED] Sorting causing errors with lookups
    By Khoori7 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-26-2013, 10:49 PM
  4. [SOLVED] Date format error causing macro bug
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-09-2012, 06:38 AM
  5. Metadata in Excel 2010 causing issues with sorting
    By bz6djs in forum Excel General
    Replies: 0
    Last Post: 02-14-2012, 10:27 AM
  6. quotes causing error
    By dftf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2009, 03:27 PM
  7. INDEX, IF with AND causing #NUM! error
    By cedarhill in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-10-2009, 01:33 PM

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