nested if contains a syntax error because of a "."

J

Janis

=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, ""), ""), "")

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,
 
P

Pranav Vaidya

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

HTH,
 
T

Toppers

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","")))
 
D

Dave Peterson

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.
 
Top