SOLVED

Need assistance for a formula

Copper Contributor

Hi,

being a "nitwit" when it comes to math and formulas I need assistance with an Excel formula.

  • Cell D43 is a sum.
  • Depending on its vealue I want to display different texts in cell B44.
  • I have three texts divided over cell B46 - C46 - D46
  • If the sum in cell D43<=12, I want cell D43 showing the text of cell B46
    If the sum in cell D43 >12 and <=19, I want cell D43 showing the text of cell C46
    If the sum in cell D43=>20, I want cell D43 showing the text of cell D46.

I asked ChatGPT that came with different answers that made Excel coming with an errorr message:

 

"A problem was found with this formula.

 

Don't want to type a formula?
In Excel, if the first character is an equal sign (=) or minus sign (-), it is considered a formula:

- If you type this: =1+1, it will be displayed in the cell as: 2

You can solve this by typing an apostrophe ( ' ) first:

- If you type: '=1+1, this will be displayed in the cell as: =1+1".

 

Below the ChatGPT answers:

 

=IF(D43<=12,B46,IF(D43<=19,C46,D46))

 

=IF(D43<=12,B46,IF(AND(D43>12,D43<=19),C46,D46))

 

=IF(D43<=12,"Text in B46",IF(AND(D43>12,D43<=19),"Text in C46","Text in D46"))

 

=IF(D43<=12," Your child's asthma may be very poorly controlled. Please contact your child's healthcare provider right away. "&"Still: no matter what your child's score is, there may be more you and your child's healthcare provider could do to help control your child's asthma symptoms.",IF(AND(D43>12,D43<=19)," Your child's asthma may not be well controlled. Please contact your child's healthcare provider. "&"Because, no matter what your child's score is, there may be more you and your child's healthcare provider could do to help control your child's asthma symptoms."," Your child's asthma may be well controlled. Please stay in contact with your child's healthcare provider. "&"Because, no matter what your child's score is, there may be more you and your child's healthcare provider could do to help control your child's asthma symptoms even better."))

 

Perhaps somebody could help me with this. I'd be very happy with it. :)

Kornelis Jan

5 Replies

@kjdnl 

Please try

=IF(D43<=12,B46,IF(D43<=19,C46,D46) )

@Sergei Baklan 

 

Hi Sergei and thank you for your help!

Unfortunately Excel comes with the same error message.

So, there's a big chance this is due to my non-present expertise concerning formulas. For this reason I made a copy of the sheet, hoping if you could have a look at it. You will find the sheet here. Feel free to make any changes you want.

 

Know that, if it takes too much time, I'd definitely understand. But if you want to give it a try, I'd be pretty happy.

 

Thanks, Kornelis Jan

best response confirmed by Hans Vogelaar (MVP)
Solution

Hi @kjdnl ,

I downloaded your file (attached) but not sure what exactly doesn't work. Could you please specify?

 

Hi Sergei,

thanks again for helping out!

Since you didn't run into the issue I opened the file again to see if I still would experience the problem and I was completely astonished by the fact that now it works.

I can't explain this and I apologize for having bothered you with this. Hope it didn't take much of your time.

Best regards,
Kornelis Jan

@kjdnl 

No problems, main point it works for you.

1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

Hi @kjdnl ,

I downloaded your file (attached) but not sure what exactly doesn't work. Could you please specify?

 

View solution in original post