Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default using text in an if function

I am trying to make a formula that will take the value in one cell and place
a value in another cell. ex a1=shop then a2 would = 85 but if a1 = on site
then a2 would = 95. When I try this I get a #name? error.
Can any one help this beginner?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default using text in an if function

In A2 try:
=IF(A1="shop",85,IF(A1="on site",95,""))

Hope this helps
Rowan

Brent wrote:
I am trying to make a formula that will take the value in one cell and place
a value in another cell. ex a1=shop then a2 would = 85 but if a1 = on site
then a2 would = 95. When I try this I get a #name? error.
Can any one help this beginner?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default using text in an if function

Brent,

if you're just trying to type this formula into a cell, then the text values
have to be inside inverted commas, otherwise Excel assumes you're referring
to a named range.

=IF(A1="shop",85,0)

Cheers, Pete.


"Brent" wrote:

I am trying to make a formula that will take the value in one cell and place
a value in another cell. ex a1=shop then a2 would = 85 but if a1 = on site
then a2 would = 95. When I try this I get a #name? error.
Can any one help this beginner?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default using text in an if function

=(A1="shop")*85+(A1="site")*95

You are getting an error probably because you need the double quotes.
--
Gary''s Student


"Brent" wrote:

I am trying to make a formula that will take the value in one cell and place
a value in another cell. ex a1=shop then a2 would = 85 but if a1 = on site
then a2 would = 95. When I try this I get a #name? error.
Can any one help this beginner?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default using text in an if function

in a2 put this formula:
=IF(A1="shop",85,IF(A1="on site",95,""))
"Brent" wrote:

I am trying to make a formula that will take the value in one cell and place
a value in another cell. ex a1=shop then a2 would = 85 but if a1 = on site
then a2 would = 95. When I try this I get a #name? error.
Can any one help this beginner?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using a conditional suffix in text function format syntax=text(value,format_text) Brotherharry Excel Worksheet Functions 1 January 13th 09 03:03 PM
Can Text Function change output text color? epiekarc Excel Discussion (Misc queries) 1 December 31st 08 02:58 AM
Advanced text function (combining text) Johan[_2_] Excel Worksheet Functions 2 March 27th 08 10:05 PM
Using Concatenate function to generate text in Text Box Mary S. Charts and Charting in Excel 1 December 14th 05 08:55 PM
Macro or Function to make text size to suite text Length? lbbss Excel Discussion (Misc queries) 4 December 14th 04 07:53 PM


All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"