+ Reply to Thread
Results 1 to 7 of 7

Using If Function

  1. #1
    Registered User
    Join Date
    06-11-2021
    Location
    UK
    MS-Off Ver
    15
    Posts
    4

    Using If Function

    Hi, I'm sure this is very straight forward?
    How do I use the 'If' function to return a value in one cell depending on the text in another cell?
    So for example; If A1=London then A5 is returned as 100
    Many thanks for any guidance.

  2. #2
    Registered User
    Join Date
    12-01-2020
    Location
    singapore
    MS-Off Ver
    Office 2024
    Posts
    59

    Re: Using If Function

    A5 cell

    =IF(A1="London",100,"")

  3. #3
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Using If Function

    In A5: =If(A1="London", 100,"whatever you want as second criteria")
    Click the * to say thanks.

  4. #4
    Registered User
    Join Date
    06-11-2021
    Location
    UK
    MS-Off Ver
    15
    Posts
    4

    Re: Using If Function

    Thanks so much! And if i need to extend that function to add an alternative... eg If A1 = Birmingham then =200, how would I incorporate that as well?

  5. #5
    Registered User
    Join Date
    12-01-2020
    Location
    singapore
    MS-Off Ver
    Office 2024
    Posts
    59

    Re: Using If Function

    =IF(A1="London",100,IF(A1="Birmingham",200,""))

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,983

    Re: Using If Function

    =IF(A1="London",100,IF(A1="Birmingham",200,""))

    If there are many options then a "lookup" function will be better

  7. #7
    Registered User
    Join Date
    06-11-2021
    Location
    UK
    MS-Off Ver
    15
    Posts
    4

    Re: Using If Function

    Brilliant! Thanks

+ 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. Right function, Left function, Mid function to extract values in column A
    By bjnockle in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-14-2020, 03:14 PM
  2. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  3. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  4. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  5. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  6. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  7. Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 PM

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