Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi i have the following code for a cell, but if I enter 01752 into RC3,5 I
am getting "Long distance". Can someone tell me what I'm doing wrong thanks A "=IF(LEFT(RC3,5)=""01752"",""Local"",IF(LEFT(RC3,5 )=""01548"",""Local"",IF(LEFT(RC3,5)=""01803"",""L ocal"",IF(LEFT(RC3,5)=""0845"",""Local"",""Long Distance""))))" |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Why double quotes?
Try =IF(LEFT(RC3,5)="01752","Local",IF(LEFT(RC3,5 etc. -- Greetings from New Zealand "Alex H" wrote in message ... Hi i have the following code for a cell, but if I enter 01752 into RC3,5 I am getting "Long distance". Can someone tell me what I'm doing wrong thanks A "=IF(LEFT(RC3,5)=""01752"",""Local"",IF(LEFT(RC3,5 )=""01548"",""Local"",IF(LEFT(RC3,5)=""01803"",""L ocal"",IF(LEFT(RC3,5)=""0845"",""Local"",""Long Distance""))))" |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Alex,
RC3,5 is not a cell reference. Do you mean RC[3] ? ie three columns to the right of the cell that the formula is in Also I assume that "0845" is actually "01845" Also I do not understand whay you have double quotes when you should only have single quotes. -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings with @tiscali.co.uk "Alex H" wrote in message ... Hi i have the following code for a cell, but if I enter 01752 into RC3,5 I am getting "Long distance". Can someone tell me what I'm doing wrong thanks A "=IF(LEFT(RC3,5)=""01752"",""Local"",IF(LEFT(RC3,5 )=""01548"",""Local"",IF(LEFT(RC3,5)=""01803"",""L ocal"",IF(LEFT(RC3,5)=""0845"",""Local"",""Long Distance""))))" |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi, No I am obviously getting my perverbials in a twist.
What I was want to is that for the row I am on, if the left 5 chars in Column 3 = 01548 then local else long ditance Thanks Alex "Sandy Mann" wrote in message ... Alex, RC3,5 is not a cell reference. Do you mean RC[3] ? ie three columns to the right of the cell that the formula is in Also I assume that "0845" is actually "01845" Also I do not understand whay you have double quotes when you should only have single quotes. -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings with @tiscali.co.uk "Alex H" wrote in message ... Hi i have the following code for a cell, but if I enter 01752 into RC3,5 I am getting "Long distance". Can someone tell me what I'm doing wrong thanks A "=IF(LEFT(RC3,5)=""01752"",""Local"",IF(LEFT(RC3,5 )=""01548"",""Local"",IF(LEFT(RC3,5)=""01803"",""L ocal"",IF(LEFT(RC3,5)=""0845"",""Local"",""Long Distance""))))" |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Alex H wrote:
Hi i have the following code for a cell, but if I enter 01752 into RC3,5 I am getting "Long distance". Can someone tell me what I'm doing wrong [....] "=IF(LEFT(RC3,5)=""01752"",""Local"",IF(LEFT(RC3,5 )=""01548"",""Local"",IF(LEFT(RC3,5)=""01803"",""L ocal"",IF(LEFT(RC3,5)=""0845"",""Local"",""Long Distance""))))" I assume the double-quotes are an anomaly of the way you wrote the posting. Otherwise, Excel would flag them as syntax errors. I suspect you have a numeric value in the cell, not 01752 as text. Several possible remedies: 1. Format the cell as Text __before__ you enter 01752. 2. Enter '01752 into the cell. Notice the initial apostrophe. 3. Enter ="01752" into the cell. |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Alex H wrote:
Hi i have the following code for a cell, but if I enter 01752 into RC3,5 I am getting "Long distance". Can someone tell me what I'm doing wrong [....] "=IF(LEFT(RC3,5)=""01752"",""Local"",IF(LEFT(RC3,5 )=""01548"",""Local"",IF(LEFT(RC3,5)=""01803"",""L ocal"",IF(LEFT(RC3,5)=""0845"",""Local"",""Long Distance""))))" I presume that the double-quotes are an anomaly of the way you wrote your posting; otherwise, Excel would flag a syntax error. I suspect the cell (RC3) contains a numeric value, not text. You can confirm that by enter =type(RC3) in some cell (but you probably need to replace "RC3"). Several possible remedies: 1. Format the cell as Text __before__ you enter 01752. 2. Enter '01752. Note the apostrophe. 3. Enter ="01752". By the way, I suspect that "0845" is a typo. Otherwise, that condition would be true only when the cell has exactly the text 0845. Your use of LEFT(,5) implies that you want to allow for more than just 4 characters. PS: I also presume that your use of RC3 is not root cause of your problem. The cell reference RC3 works just fine if you have set the R1C1 option. Otherwise, Excel would flag a syntax error. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks All
A "Alex H" wrote in message ... Hi i have the following code for a cell, but if I enter 01752 into RC3,5 I am getting "Long distance". Can someone tell me what I'm doing wrong thanks A "=IF(LEFT(RC3,5)=""01752"",""Local"",IF(LEFT(RC3,5 )=""01548"",""Local"",IF(LEFT(RC3,5)=""01803"",""L ocal"",IF(LEFT(RC3,5)=""0845"",""Local"",""Long Distance""))))" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Wrong Hyperlink location after sorting | Excel Discussion (Misc queries) | |||
Goal Seeker Giving Wrong Answer | Excel Discussion (Misc queries) | |||
Getting wrong values | Excel Worksheet Functions | |||
SUMPRODUCT is showing wrong Amount | Excel Discussion (Misc queries) | |||
hyperlink navigation path path wrong in Excel 2003 | Excel Discussion (Misc queries) |