+ Reply to Thread
Results 1 to 2 of 2

sql where statement with range: how to separate by a comma

  1. #1
    Registered User
    Join Date
    10-07-2018
    Location
    New York, USA
    MS-Off Ver
    Excel 2016
    Posts
    1

    sql where statement with range: how to separate by a comma

    I'm new to VBA and I'm trying to pull info from a range of cells that will be plugged into the "where" clause of a sql statement. Since it is a where clause, I need to separate the variables with a comma. For example, my code is:
    Please Login or Register  to view this content.
    Right now, I can't create a range that will work in the where statement without the comma.
    Thanks!
    Last edited by jeffreybrown; 10-07-2018 at 04:22 PM. Reason: Please use code tags when posting code!

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

    Re: sql where statement with range: how to separate by a comma

    I didn't quite understand what you mean, but look at it:
    Please Login or Register  to view this content.
    The rest is in a workbook (attachment).
    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] List of Number With Separate by comma
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-07-2018, 07:14 AM
  2. Separate Comma onto new worksheet
    By flipyducky21 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2014, 12:09 PM
  3. Need VBA code to separate Comma delimited Cells to separate Cells
    By clitman1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2013, 10:29 AM
  4. [SOLVED] Separate with Comma in one Cell
    By sanjeevi888 in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 06-22-2012, 11:54 AM
  5. Break Down Comma Separate Values
    By sod_hector in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-08-2009, 01:25 PM
  6. Comma separate keywords
    By toddroutt in forum Excel General
    Replies: 2
    Last Post: 08-10-2007, 07:27 PM
  7. How to separate words by comma
    By wliong in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2006, 06:10 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