+ Reply to Thread
Results 1 to 3 of 3

vba if query issues

  1. #1
    Registered User
    Join Date
    09-22-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    14

    vba if query issues

    Hello,

    the code below is to search column 3 for any value put into column 1. then it is meant to look in column 4 and if that is empty paste in the information but if it has data in it to insert a line then paste the data. the issue I am having is that it inserts the line regardless of whether there is information or not. can someone tell me how to fix this and explain what I did wrong so that I don't make the same mistake in the future.

    Please Login or Register  to view this content.
    apologies if the code is messy or inefficient, I am quite new to coding with VBA,

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: vba if query issues

    Not entirely clear to me if you are copying the search value or the target, but along these lines.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,267

    Re: vba if query issues

    Quote Originally Posted by BaronVonBeefDip View Post
    1. ... the code below is to search column 3 for any value put into column 1
    2. ... then it is meant to look in column 4
    and
    3. if that is empty paste in the information
    but
    4. if it has data in it to insert a line then paste the data ...

    I don't know if I understood correctly (maybe attach your example, i.e. layout and expected result ... ?)
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] power query issues on formating
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-15-2017, 02:27 PM
  2. Excel 2010 Query issues
    By bassam in forum Excel General
    Replies: 0
    Last Post: 06-23-2014, 03:37 AM
  3. Replies: 0
    Last Post: 04-22-2014, 07:09 PM
  4. Web Query Issues
    By nguyeda in forum Excel General
    Replies: 1
    Last Post: 02-06-2009, 03:50 AM
  5. Replies: 2
    Last Post: 12-10-2007, 07:43 PM
  6. Issues cleaning up External Query VBA
    By mkaake in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2007, 11:26 AM
  7. Web Query Refresh Issues
    By Hfly in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-15-2006, 06:25 PM

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