![]() |
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. |
iif statements
|
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. |
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. |
All times are GMT +1. The time now is 05:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com