Why put + at the start of a formula?

CliveInTokyo

New Member
Joined
Jun 9, 2004
Messages
6
Greetings all,

This is my first post.

I am working on someone elses spreadsheet, and they have a formula similar to this:

=+k6+k12

Experimentation has failed to reveal the purpose of the + at the beginning of the formula, and it doesn't seem to be related to changing the sign of the number.

Can anyone enlighten me as to the purpose of this +?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I believe this isn't necessarily a throwback to Lotus. Entering + at the start of a formula is simply faster than pressing Shift+0 for the = sign, especially when you have your right hand on the numeric keys (don't know the english name for it) on the right of your keyboard.

I often use this method, and I have never used Lotus.
 
Upvote 0
Heya, Smitty. I don't believe you need to turn on Transition options to do:- +1+2 and get 3. I'm pretty sure Excel recognizes this.
You're right. With Transition enabled, you eliminate the need for the first "+". So entering 1+3 = 3.

Smitty
 
Upvote 0
Smitty, for sufficiently small values of 1, that formula may indeed be correct. :wink:
Probably unrelated, but what's with the double negatives I see in some posts? For example:
from: SumIF using 2 Specifications for 1 Result. Help Please
Aladin Akyurek said:
=SUMPRODUCT(--ISNUMBER(MATCH($E$3:$E$35,{"ERISA","IRA","PENSION"},0)),$C$3:$C$35)
I can't find any reference in VBA or Excel Help.
 
Upvote 0
"--" makes a value out of a string

put True in A1
in B1 : = A1
in C1 : = --A1

you'll see what happens

an example in VBA:
Code:
Sub compare_val_to_str()
numval = 15
strval = "15"
  If strval = numval Then
  MsgBox strval & "(string) = " & numval & "(value)"
  Else: MsgBox strval & "(string) <> " & numval & "(value)"
  End If
If --strval = numval Then
MsgBox "--" & strval & "(string) = " & numval & "(value)"
Else: MsgBox "--" & strval & "(string) <> " & numval & "(value)"
End If
End Sub

kind regards,
Erik
 
Upvote 0
Very nice. Thank you both.
And while Jacob does indeed explain it well, Aladin goes above and beyond the call of duty with a textboox case study of variable coercion, so hats off to them also.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,331
Members
452,636
Latest member
laura12345

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