Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 01-13-2019, 07:56 PM
Alaska1 Alaska1 is offline Windows 7 64bit Office 2007
Advanced Beginner
 
Join Date: Nov 2011
Posts: 80
Alaska1 is on a distinguished road
Default Using If Function

I want to use the IF function to return a value in excel.



Example
A1 is equal to X than return Sales in the cell.

I tried a number if functions but could not get it to work.
Attached Files
File Type: xlsx Book1.xlsx (7.6 KB, 12 views)
Reply With Quote
  #2  
Old 01-14-2019, 07:56 AM
Marcia Marcia is offline Windows 7 32bit Office 2007
Competent Performer
 
Join Date: May 2018
Posts: 159
Marcia is on a distinguished road
Default

Add quotation marks before and after the X, like
=if(A2="X","Sales",0)
Reply With Quote
  #3  
Old 01-14-2019, 08:57 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Windows 7 64bit Office 2010 64bit
Moderator
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,335
Pecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of light
Default

Marcia, were you able to download the OP's attachment?
__________________
Problem solved ? Let others know by clicking " Thread Tools" then " Mark thread as solved".( This can be undone if need be)
Want to thank for the help received ? Click the scales symbol in the upper right corner of a post from the person you want to thank.
Reply With Quote
  #4  
Old 01-14-2019, 04:16 PM
Alaska1 Alaska1 is offline Windows 7 64bit Office 2007
Advanced Beginner
 
Join Date: Nov 2011
Posts: 80
Alaska1 is on a distinguished road
Default

Thank you. it worked.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Restrict Editing function disable insert textbox function IanM_01 Word 5 11-21-2015 02:29 AM
#REF! Error in calling VBA function disappears when function is copied lcaretto Excel Programming 2 05-26-2014 07:19 PM
Creating a graph for Future Value function (FV function) bmoody Excel 2 11-06-2013 10:52 AM
Sum Function teza2k06 Excel 3 02-06-2013 08:29 AM
how to use now() function gsrikanth Excel 1 01-07-2012 01:18 AM


All times are GMT -7. The time now is 07:32 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft