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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top