Skip to main content
Solved

What is wrong with this?

  • June 23, 2020
  • 9 replies
  • 35 views

Forum|alt.badge.img+8

IF(
SEARCH(“1”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 0, ‘days’),
IF(
SEARCH(“2”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 1, ‘days’),
IF(
SEARCH(“3”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 2, 'days’),
IF(
SEARCH(“4", {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 3, ‘days’)
)
)
)

I added the last bit by copying the one before it and now the formula doesn’t work, what am I doing wrong?

Best answer by Jeremy_Oglesby

Looks like you are missing one closing parenthesis at the very end. You have 4 IF( statements, but only 3 of them are closed. That should be all – assuming your quotes are “straight” quotes in the Formula editor.

9 replies

Forum|alt.badge.img+18

Looks like you are missing one closing parenthesis at the very end. You have 4 IF( statements, but only 3 of them are closed. That should be all – assuming your quotes are “straight” quotes in the Formula editor.


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • June 23, 2020

Looks like you are missing one closing parenthesis at the very end. You have 4 IF( statements, but only 3 of them are closed. That should be all – assuming your quotes are “straight” quotes in the Formula editor.


IF(
SEARCH(“1”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 0, ‘days’),
IF(
SEARCH(“2”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 1, ‘days’),
IF(
SEARCH(“3”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 2, 'days’),
IF(
SEARCH(“4", {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 3, 'days’)
)
)
)
)

So this should work?


Forum|alt.badge.img+18

IF(
SEARCH(“1”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 0, ‘days’),
IF(
SEARCH(“2”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 1, ‘days’),
IF(
SEARCH(“3”, {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 2, 'days’),
IF(
SEARCH(“4", {Type of Workshop or Class Offered}),
DATEADD({Proposed Date of Workshop or Class}, 3, 'days’)
)
)
)
)

So this should work?


Yep - that looks valid to me.


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • June 23, 2020

Yep - that looks valid to me.


would it matter if some is nested and some is not?


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • June 23, 2020

would it matter if some is nested and some is not?


what key strokes are used for nesting spacebars or tab?


Forum|alt.badge.img+18

what key strokes are used for nesting spacebars or tab?


Nesting should not matter - the formula editor ignores most whitespace.


Forum|alt.badge.img+18

Are you still getting errors? If so, the next thing to check would be the quotation marks. If you are copy-pasting what is here in your forum posts, you are going to end up pasting “smart” or “curly” quotes – they all need to be replaced with " and ' - “straight” quotes.


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • June 23, 2020

Are you still getting errors? If so, the next thing to check would be the quotation marks. If you are copy-pasting what is here in your forum posts, you are going to end up pasting “smart” or “curly” quotes – they all need to be replaced with " and ' - “straight” quotes.


It was the straight quotes! Good call!


Forum|alt.badge.img+18

For the benefit of future forum readers, could you mark my original reply as the “Solution” here – that was the primary issue with your formula at first.