+ Reply to Thread
Results 1 to 2 of 2

Return Value Based on Several Conditions

  1. #1
    Registered User
    Join Date
    01-07-2021
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    5

    Return Value Based on Several Conditions

    Hello,

    I am trying to speed up data entry by automating entry based on several criteria. I use Passive Integrated Transponder (PIT) tags to uniquely identify individuals in a wildlife population. Each PIT tag contains a 9-digit series(i.e.900226001) and a 6- digit unique ID (250226). PIT series and PIT ID are housed within their own columns. The PIT series changes based on tag size, batch, or year produced but are consistent based on the first 3 digits of the PIT ID. To automate entry of the PIT series based on the PIT ID, I am trying to figure out a formula that will return a certain value based on the first 3 digits of the PIT ID. Basically the first 3 digits of PIT ID in my data set is either 555,022,550 and the last 3 digits are unique (totaling 6 digits: i.e. 550123,550124,550125, 022551,022552 and so on). I would like the search criteria to be based on the first 3 digits of the PIT ID and return the PIT series based on that.

    I have tried =IF and =ISNUMBER(SEARCH and so on but not getting anything to work.

    Examples:

    =IF(LEFT(C2,3)555,900226001,900228000) - all that returns is 900228000

    =IF(C2, 205),900226001,900228000) - all that returns is 900226001

    Any insight or direction is appreciated!

    Thanks,
    RF

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Return Value Based on Several Conditions

    Your first example should be written like this:

    =IF(LEFT(C2,3)="555",900226001,900228000)

    as the LEFT function returns a text value, so you need to use quotes around the 555. Your second example should probably be like this:

    =IF(LEFT(C2,3)="205",900226001,900228000)

    Hope this helps.

    Pete

+ 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. Return a row value based on conditions
    By roman22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-21-2019, 12:09 AM
  2. Replies: 1
    Last Post: 10-10-2016, 07:43 AM
  3. Return Value Based on Two Conditions
    By JillC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-12-2015, 06:01 PM
  4. Return value based on a number of conditions
    By scottwc in forum Excel General
    Replies: 12
    Last Post: 08-29-2014, 02:02 AM
  5. [SOLVED] return count value based on several conditions
    By Arturas in forum Excel General
    Replies: 3
    Last Post: 05-06-2012, 12:23 PM
  6. return count value based on several conditions
    By Arturas in forum Access Tables & Databases
    Replies: 3
    Last Post: 05-06-2012, 12:23 PM
  7. return value based on two conditions
    By sly424 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-07-2007, 01:43 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