+ Reply to Thread
Results 1 to 3 of 3

Left and Instr functions together?

  1. #1
    Registered User
    Join Date
    06-19-2015
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    30

    Left and Instr functions together?

    I am trying to check if a cell contains the number "10" and return a 1 or a 0 in the next cell, but only if "10" is the first 2 numbers.
    This is so I can find dates from October in my September sheet and mark them with a 1, but so far it is marking any cells that contain the number "10" (so the 10th day of the month as well as the 10th month.)

    Currently I have this:

    Please Login or Register  to view this content.
    Is there a way to use the Left function inside of the Instr function so it checks if the number 10 is in the first 2 numbers of a cell?

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Left and Instr functions together?

    Why do you need to use InStr if you're always checking the first two characters? Can't you just do this?

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Registered User
    Join Date
    06-19-2015
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    30

    Re: Left and Instr functions together?

    You're a genius! Thanks so much.

+ 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. using InStr and Mid functions
    By bbhockey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2015, 01:09 PM
  2. [SOLVED] Left, Mid, Right Functions
    By mborde3 in forum Excel General
    Replies: 5
    Last Post: 01-21-2015, 10:52 AM
  3. RIGHT/LEFT/MID Functions
    By blind527 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-18-2013, 05:02 PM
  4. Excel 2007 : right, mid, and left functions
    By ghhoyl in forum Excel General
    Replies: 7
    Last Post: 09-01-2010, 08:13 AM
  5. Left and Right Functions
    By jengalinato in forum Excel General
    Replies: 2
    Last Post: 03-10-2007, 10:21 AM
  6. [SOLVED] LEFT / RIGHT functions
    By Kevin G in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2006, 06:10 PM
  7. LEFT, MID functions?
    By Lindsey M in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2005, 05:06 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