Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If then statements | Excel Discussion (Misc queries) | |||
IF Statements (Mutliple Statements) | Excel Worksheet Functions | |||
operator statements, shorting when reusing one of the statements? | Excel Programming | |||
IF Statements | Excel Programming | |||
If ..Then statements | Excel Programming |