SOLVED

If function syntax help

Copper Contributor

I am trying to determine an entry in a cell according to a size.

I have tried the following, but with no luck.  I assume my syntax is wrong somewhere.

=IF (G13<=235000, [G13], [235000]) is typed into the cell I want the answer (which is a number) to be returned to (for reference use, let's say G100).  When are spaces required

 

I am asking if the number in G13 is less than or = to 235,000. If true, let G100=G13.  If false (G13>235000), let G100=235,000.  What am I doing wrong?

 

Thank you for your help.  I am somewhat a novice at the updated Excel programs and found conflicting directions in the help and online.  When are spaces required?

 

Cindy 

 

 

 

 

4 Replies
best response confirmed by Ageless (Copper Contributor)
Solution

@Ageless Remove square bracket. Try-

=IF(G13<=235000,G13,235000)

 

@Harun24HR 

 

Thank you so very much.  It worked!!!!

@Ageless 

Or, slightly shorter:

 

=MIN(G13, 235000)

@Hans Vogelaar

Clever idea!  Thank you. 

1 best response

Accepted Solutions
best response confirmed by Ageless (Copper Contributor)
Solution

@Ageless Remove square bracket. Try-

=IF(G13<=235000,G13,235000)

 

View solution in original post