Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default nested if contains a syntax error because of a "."

=if(left(C2,4),ur01,12.13.145.166,if(left(C2,4),ur 02
,12.13.145.167,if(left(C2,4) ,ur03,13.12.145.168, ""), ""), "")

I want to put the right IP address in the cell if if the Cn cell matches the
right modem. It is stopping on the modem number, is that because there is a
"." in the IP number? How can I escape it?

tia,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default nested if contains a syntax error because of a "."

Hi Janis,
I thin enclose your IP address in "" like, "12.13.145.166".

HTH,
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Janis" wrote:

=if(left(C2,4),ur01,12.13.145.166,if(left(C2,4),ur 02
,12.13.145.167,if(left(C2,4) ,ur03,13.12.145.168, ""), ""), "")

I want to put the right IP address in the cell if if the Cn cell matches the
right modem. It is stopping on the modem number, is that because there is a
"." in the IP number? How can I escape it?

tia,

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default nested if contains a syntax error because of a "."

IS this what you mean ...

=IF(LEFT(C2,4)="ur01","12.13.145.166",IF(LEFT(C2,4 )="ur02","12.13.145.167",IF(LEFT(C2,4)="ur03","13. 12.145.168","")))

"Janis" wrote:

=if(left(C2,4),ur01,12.13.145.166,if(left(C2,4),ur 02
,12.13.145.167,if(left(C2,4) ,ur03,13.12.145.168, ""), ""), "")

I want to put the right IP address in the cell if if the Cn cell matches the
right modem. It is stopping on the modem number, is that because there is a
"." in the IP number? How can I escape it?

tia,

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default nested if contains a syntax error because of a "."

You have to surround text with double quotes: "

=if(left(C2,4)="ur01","12.13.145.166",
if(left(C2,4)="ur02","12.13.145.167",
if(left(C2,4)="ur03","13.12.145.168", "")))

And it's better to copy your formula attempt from the formula bar and paste it
into your message. It'll avoid typos while composing the message.

Janis wrote:

=if(left(C2,4),ur01,12.13.145.166,if(left(C2,4),ur 02
,12.13.145.167,if(left(C2,4) ,ur03,13.12.145.168, ""), ""), "")

I want to put the right IP address in the cell if if the Cn cell matches the
right modem. It is stopping on the modem number, is that because there is a
"." in the IP number? How can I escape it?

tia,


--

Dave Peterson
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
Shortcut key for "Paste Options" and "Error Checking" buttons? johndog Excel Discussion (Misc queries) 1 October 6th 06 11:56 AM
Syntax to "OR" 3 "ISERROR" conditions Mike K Excel Worksheet Functions 6 July 22nd 06 04:18 PM
"How do I correct error in Excel2003 for nested subtotal?" Nimesh Excel Discussion (Misc queries) 1 February 23rd 06 08:23 AM
I get error with "ROWS" in the formula - nested formula question Marie J-son Excel Worksheet Functions 0 January 4th 06 01:55 PM
what is syntax for if(between range of dates,"Q1","Q2")? TLB Excel Worksheet Functions 3 December 6th 05 05:19 PM


All times are GMT +1. The time now is 12:11 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"