Concantonate - syntax

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,023
Office Version
  1. 365
Platform
  1. Windows
I'm using the following formula: =IFS(J27>J26,"PLUS",J27<J26,"MINUS",J27=J26,"LEVEL") and what I would like to do is add the contents of cell K28 to display with "PLUS" or "MINUS"
for example to show MINUS the value of K28 but without the minus symbol (or plus symbol in the case of PLUS. If LEVEL there is nothing additional to display other.

i.e. MINUS 1, PLUS 2 etc.

Can anyone point me in the right direction, please?

Mel
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Is this what you mean? If not please give more, and clearer, examples of exactly what you have and what you want.

Excel Formula:
=CHOOSE(SIGN(J27-J26)+2,"MINUS " & K28,"LEVEL","PLUS "&K28)
 
Upvote 0
try this

=IFS(J27>J26,"PLUS "&K28,J27<J26,"MINUS "&K28,J27=J26,"LEVEL")
 
Upvote 0
Thank you. Alan. I'm almost there, now having seen your reply.

Thank you Peter, but I couldn't follow your suggestion, which is probably due to my poor explanation.

What I wish to display with my formula is the word "MINUS", "PLUS" or LEVEL" along with the value of cell K28. If this value is a minus, I do not wish to display the actual 'minus' symbol. In other words, the following would be displayed: MINUS 1, or PLUS 2 or LEVEL
 
Upvote 0
I've managed to "create"(?) a work-around. In cell K29 I've put =ABS(K28) and amended the formula to read: =IFS(J27>J26,"PLUS"&" "& K28,J27<J26,"MINUS"&" "&K29,J27=J26,"LEVEL")
This now displays as e.g. PLUS 2 or MINUS 2 or LEVEL, which is what i was trying to achieve.

Thanks for your input.

Mel
 
Upvote 0
How is the value in K28 obtained? Is it a formula? If so, what formula?
 
Upvote 0
Then you can use that directly instead of referring to J26 and J27
Either
Excel Formula:
=CHOOSE(SIGN(K28)+2,"MINUS " & -K28,"LEVEL","PLUS "&K28)
or
Excel Formula:
=IFS(K28>0,"PLUS "&K28,K28<0,"MINUS "&-K28,1,"LEVEL")
or
Excel Formula:
=IF(K28>0,"PLUS "&K28,IF(K28<0,"MINUS " &-K28,"LEVEL"))
 
Upvote 0
Solution
Many thanks, Peter,

I've chosen your first solution, which is much simpler than my effort!

Mel
 
Upvote 0
Yet another option might be to have the very simple formula
Excel Formula:
=K28
and format that cell with a Custom format like this.

1637839091160.png


21 11 25.xlsm
KL
28-6MINUS 6
Plus Minus
Cell Formulas
RangeFormula
K28K28=J27-J26
L28L28=K28
 
Upvote 0

Forum statistics

Threads
1,215,457
Messages
6,124,941
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top