Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default iif statements

I am familuar with iif statements in Access but I am new to excel.

I have a cell in this workbook that references another page in the same
workbook

I want to determine if the value in that cell is =51

If it is I need to insert 126.50 into a cell and if it isn't then I need to
insert 113.00 into that cell.

I have no idea how to accomplish this. I have looked at help but do not
find anything under the iif category.

Any help would be appreciated.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default iif statements

You posted in programming so may we assume you want a macro.

if sheets("yoursheet").range("yourrnage")=51 then
range("yourdestinationcell")=126.50
else
range("yourdestinationcell")=113
end if

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"cvegas" wrote in message
...
I am familuar with iif statements in Access but I am new to excel.

I have a cell in this workbook that references another page in the same
workbook

I want to determine if the value in that cell is =51

If it is I need to insert 126.50 into a cell and if it isn't then I need
to
insert 113.00 into that cell.

I have no idea how to accomplish this. I have looked at help but do not
find anything under the iif category.

Any help would be appreciated.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default iif statements

Sub iffy()
Set r1 = Range("A1")
Set r2 = Range("A2")
If r1.Value = 51 Then
r2.Value = 126.5
Else
r2.Value = 113
End If
End Sub

Naturally if you want to examine and change the same cell, just make r1 and
r2 the same.
--
Gary''s Student - gsnu200818


"cvegas" wrote:

I am familuar with iif statements in Access but I am new to excel.

I have a cell in this workbook that references another page in the same
workbook

I want to determine if the value in that cell is =51

If it is I need to insert 126.50 into a cell and if it isn't then I need to
insert 113.00 into that cell.

I have no idea how to accomplish this. I have looked at help but do not
find anything under the iif category.

Any help would be appreciated.

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
If then statements Emily Excel Discussion (Misc queries) 3 March 20th 07 04:48 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
operator statements, shorting when reusing one of the statements? KR Excel Programming 1 August 4th 05 06:20 PM
IF Statements Jeff Excel Programming 3 February 8th 05 10:03 PM
If ..Then statements phil Excel Programming 4 January 22nd 05 11:23 PM


All times are GMT +1. The time now is 12:18 PM.

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

About Us

"It's about Microsoft Excel"