+ Reply to Thread
Results 1 to 3 of 3

If/Then Statements

  1. #1
    Registered User
    Join Date
    03-09-2013
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel for Mac 2011
    Posts
    1

    Question If/Then Statements

    Hello all,

    Please allow me to apologize in advance if I break any forum rules or forum etiquette. I'm not a regular user or poster.

    I'm trying to create a table/formula that can be applied to a spreadsheet I use several times a week. The spreadsheet is downloaded from an online app from my company (it's different every time). In a nutshell, it's the locations of each of my employees and where they have logged in.

    I can see the store number, presented like WM856 or WM1340, but I need to know an additional piece of information that is not available on the spreadsheet. It is a number that I'd assign based on what's found in that column.

    So, I'd like to create a formula that says if you find any of these values (WM856, WM1340, WM722, etc... (there are a possible 25 of them), then assign a number in another column. So, if you see WM856 or WM722 or WM1488 and so on, then place a 22. There are three different numbers I'd like to place based on which of the 25 store numbers might be found.

    Thanks in advance for any insight into my question.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,929

    Re: If/Then Statements

    Build a table with the 25 values in another sheet. In the column to the right put the number 22 or whatever number you want for the 25 values

    In the sheet you are downloading, add a column adjacent column. Use the vlookup in that column to return the assigned values from the second column in the table you created.

    Here is the syntax for vlookup. http://www.techonthenet.com/excel/formulas/vlookup.php
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: If/Then Statements

    You can use a simple vlookup. I created a thread a while back with several advanced options for vlookup that you might also want to look at.

    Hope this helps.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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