Reason For -- (Double Negative) In Formulas

Jul 2, 2008

I have come across this only a couple times and have tried in vain to find out what the "--" does in formulas

one example I have run accross in the forums is below

= SUMPRODUCT(--(ISNUMBER( FIND("SMS",A1))))

Also, is there a good refrence source for formulas like this?

View 3 Replies


ADVERTISEMENT

Reason For Double Negative Signs In Formula

Sep 19, 2007

I've just seen a formula with two - (minus) signs right next to each other placed before a section in a formula while reading possible answers to my post. Here is the link: Understanding this formula. I've seen it before and am intrigued as to why it is there and what it actually does. Assume it is used such: = --(1+2). Would the answer then not be =--3 = 3?

View 4 Replies View Related

Double Dash In Formulas

Sep 1, 2006

I recently saw Krishnakumar use the formula.
= sumproduct(--(a2:a10=d2),--(b2:b10=e2),c2:c10)

I haven't seen sumproduct used this way. Very cool. I see how it is working, but can anyone tell me more about the syntax of the dash dash used in array 1 and array 2? I have never seen this. How is it different than =SUMPRODUCT(1*(A1:A9=G1),1*(B1:B9=H1),C1:C9), which is the syntax I'm used to seeing.

View 9 Replies View Related

Using Min And Max Formulas With Both Positive And Negative Numbers

Jul 3, 2012

I want to find the min and max numbers within a thread of numbers that has both positive and negative values. The key is that I want the smallest amount or the largest amount based on the number and not on the positive or negative.

For example, below is my list of numbers.

7
5
2
-5
-6
7
-8
-3

I want the min formula to return 2 and the max formula to return 8.

View 2 Replies View Related

UDF: #REF For No Reason

Jun 15, 2009

This is something that's been bugging me for the last few hours.

I've written a fairly simple VBA

View 9 Replies View Related

Code Gets Skipped Without Reason

Apr 21, 2007

I'm currently trying to put together a rather large application to automate a release procedure.
Somewhere in a procedure I have the following
'previous code...
WS.Columns(8).Select
Selection.Copy
WS.Columns(1).Select
Selection.Insert Shift:=xlToRight
WS.Columns(1).NumberFormat = "General"
End Sub

The WS is defined in the beginning of that sub as follows:
Dim WS As Worksheet 'iSpares sheet
Set WS = Workbooks(FrmReleaseFlow.Caption).Worksheets("iSpares")

whereas the FrmReleaseFlow is a userform, active at that time, the caption contains the filename currently working on (in NAME.XLS format, no path), the file is open and the sheet iSpares exists...

The problem is that the code in above procedure gets executed to just that line and then the sub exits and the program continues in the sub right after this sub was called...

The weird thing is, if I set a breakpoint on the line WS.Columns(8).Select, then the execution halts there. If I then continue, the other lines are not executed. Breakpoint on the other four lines are never seen...
So the problem lies within that line WS.Columns(8).Select ...
If I execute this command in the Immediate window, while the code is halted on a breakpoint, it does work as it should...

View 9 Replies View Related

Calculating Cells For No Reason

Oct 21, 2008

If I enter anything in a cell on one work book I get calculating cell for about 3-5 seconds.

I don't have any formulas looking at the book. and I have deleted, renames, copy and pasted, exported to text and reimported and still it does it.

The thing that is odd though is that if I press return again it clears the calulation cells message.

View 9 Replies View Related

Msgbox Returning For Unknown Reason

Mar 17, 2007

I have a macro that uses user input to locate a file. If no file is found matching the user input, a message box displays informing the user. However, if a file is found that matches the user input, the file should simply open. If a file is found, the macro successfully opens the file however it will still display the message box saying no file is found. Since the message box is triggered by an error, there must be another error I haven't accounted for in my code.

Private Sub CommandButton1_Click()
Private Sub CrmFrm1_Click()
If Len(TextBox1) <> 12 Then
MsgBox "Incorrect Case File Number"
FrmNew.TextBox1.SetFocus
Exit Sub
End If
Dim MyCase
MyCase = Dir("S:AccountingProbationTest Files" & FrmNew.TextBox1.Value)
On Error Goto ErrorHandler
Workbooks.Open Filename:="S:AccountingProbationTest Files" & FrmNew.TextBox1.Value
Unload Me
ErrorHandler:
MsgBox "No file found for this Case Number." & Chr(13) & "Please proceed to Template.", 0, "No File Found"
Unload Me
Exit Sub
End Sub

View 2 Replies View Related

Macro Hides Userform Without A Reason

Mar 25, 2007

to ensure the user ends up looking at UserForm5 after having closed the UserForm2 with the x sign.

It works just great - the user gets logged on and can use the UserForm2 but when he/she closes the form with the cross and tries to lo on aner using the UserForm5 - which pops up autmatically due to the above code, both of the UserForms get cloed (or hidden).



Private Sub CommandButton1_Click()

Dim popup As Variant

If ExecuteExcel4Macro("'D:[target.xls]Trg Info'!R1C255") _
= UserForm5.TextBox2.Value And ExecuteExcel4Macro("'D:[target.xls]Trg Info'!R1C256") _
= UserForm5.TextBox3.Value Then

With UserForm5

.TextBox2.Value = ""
.TextBox3.Value = ""
.Hide

End With

UserForm2.Show

With UserForm2 .....................

View 9 Replies View Related

Formula To Make Product Of Two Negative Numbers Negative

May 12, 2009

I have a large dataset (24000 rows) that requires me to multiply two different columns of integers. In some cases, the two integers are both negative and multiplying them results in a product that is positive. I actually need that product to be negative rather than positive. I can't quite seem to figure out the best way to accomplish this.

View 5 Replies View Related

ActiveX Control Button Changes Size For No Reason

Feb 18, 2014

I have created several macros where i use an active-X control button. This button is pressed and the macro begins...........but every now and again this button changes size for no apparent reason.

I have read countless articles/posts about what "may" be causing the problem but i have never read anything which clearly identifies the soln to this problem and the problem has been out there for years. To make matters worse the problem can not be duplicated on any regular frequency that i am aware of............so its not like i can post a file that will show the problem.............

View 4 Replies View Related

Loop Skipping Random Rows For No Reason At All

Apr 15, 2009

My sub is supposed to take the values from Sheet1 and paste them into 16x10 tables on Sheet2. However, for some odd reason, the loop is skipping some rows. If you take a look, there are 2184 values in Sheet1, but only 1368 end up in Sheet2...SKUs such as 518166,518167,510573,513746,513752 are just being skipped for no reason.

View 2 Replies View Related

Count Reason Codes By Current Month

Sep 23, 2013

A
B
C
D
E
F
G

740048
08/29/13
08/30/13

202

[code]....

I would like to have the count of column E. I would like to sepperate current month and year to date using column C. I would like it to reflect it in the below chart.

M
Code
N
Year to Date Date
O
Month to Date

105
1

202
5
4

402
1

View 3 Replies View Related

Convert Negative Numbers With Negative Sign On Right

Aug 1, 2007

I have data that comes from a subsytem that places the negative sign at the right of the number, so it is recognized as text. I can get around this using find and replace and then a second step to multiply that by -1, but is there a formula that can do this for me?

I was trying if(right(A1,1)="-",TBD,A1)

View 4 Replies View Related

Positive To Negative If Cell On Left Negative

Sep 1, 2007

I have data starting in E7. I want it to go down the column and find the negative numbers. If it finds one then I want it to change the number in the row to the left of it to a negative. So if E67 is a negative number, make D67 a negative and so forth down the line Sounds "simple" but how do I do it?

View 7 Replies View Related

Add Overtime Hours Bases On Reason Code And Whether Cash Or Time

May 31, 2013

How can I total overtime based on a "Reason Code" and whether the employee chose "Cash" or "Time" compensation?

View 2 Replies View Related

Formatting Sheet- Can't Get Html Or The Image Tags To Work For Some Reason

May 4, 2007

This is going to be difficult to explain, but I'll try... I need to be able to format a sheet that has all data in column format. Column A contains a number and B an application. C contains the issue data. I need the issue data to be moved under column A and B as illustrated below. What formula can I do to accomplish this?

Original:

Final:

Can't get html or the image tags to work for some reason.

View 9 Replies View Related

Userform Listbox: Check Wether Range Have Negative Values Or Not If Yes Load All Negative Values In The Listbox1 By Clicking Checkbox

Jan 19, 2009

I have data in range J2:J365 , H368:H401 & J403:J827. i want to check wether this range have negative values or not if yes load all negative values in the listbox1 by clicking checkbox.

View 3 Replies View Related

Cell Replicates Another Cell For No Apparent Reason?

Sep 18, 2013

I've found a cell that replicates another cell on the same sheet. If any number or text is entered, its replicated as text, but if I enter a formula in the cell, the cell works normally. There's no conditional formatting, no links, no macro, no nothing that I can see, yet it happens.

View 8 Replies View Related

Using Cell References In File Paths For Formulas To Create Dynamic Formulas

Dec 3, 2013

I am using a lot of linked reports that have to be rewritten each month. For example smaller formulas look like this:

=('S:PUBLICProductionJob CardsMOLDING201311 November[440A SIDE SPOILER JOB CARD.xls]Production Parts'!B$228*2)+'S:PUBLICProductionJob CardsMOLDING201311 November[440A SIDE SPOILER JOB CARD.xls]Production Parts'!B$262+'S:PUBLICProductionJob CardsMOLDING201311 November[440A SIDE SPOILER JOB CARD.xls]Production Parts'!B$292

What I want to do is extract the file path from the above formula and make it a composite of several cell references.

So what I need is to have a cell where they can change the month and another where we can change the year. So I set up several named cells that look like this:

_MONTH =11 November
_YEAR =2013
_JOBCARD ='S:PUBLICProductionJob CardsMOLDING
_PATH =_JOBCARD & _YEAR &"" &_MONTH

I tried several versions, I am hoping for something like this:

=('_PATH &"[440A SIDE SPOILER JOB CARD.xls]"Production Parts'!B$228*2)+'_PATH &"[440A SIDE SPOILER JOB CARD.xls]"Production Parts'!B$262+'_PATH &"[440A SIDE SPOILER JOB CARD.xls]"Production Parts'!B$292

View 4 Replies View Related

Converting Formulas To Relative/absolute References With Formulas Referencing Other Sheets

Dec 15, 2008

I've found a few macros that will automate changing cell references from absolute to relative and they work great. However, when I run the macros on formulas that have references to another worksheet or workbook, the macro will not work correctly.

View 9 Replies View Related

Formulas To Hide Partial Concatenate Data And Determining Two Other Formulas

Dec 11, 2013

I'm trying to automate creating certain keyword combinations I need, based off of the values I input into reference cells in columns A - E; the goal is to compile a list of keywords which I will then use to track my rankings in search engines.

I'm looking to only output 500 keywords, so some of the cells in columns A, B, C & E will not contain data (column D will always have a primary Geo-target listed). This results in some of the concatenate formulas I've created outputting partial data (i.e. if there is no data in cell A10, and cell D2 contains the word "Knoxville", then cell I10 will output the data, "Knoxville "). How can I setup conditioning formatting or a formula so that these auto-generated cells appear blank if one of the reference cells has no data within it?The reason why I need the above to work is because I want to setup a formula that automatically counts the # of keyword combinations created by the data entered into any of the reference cells. With the partial combinations being listed, it skews my data. Which leads me to my next question: what is the best formula for counting the # of cells containing a full keyword combination from any of the cells listed in columns G - O (minus the data in the header cells; i.e. G1, H1, etc...)?Lastly, is there a formula I could use that would then aggregate all of the full keyword combinations within the "Complete Keyword List" column (column P)?

View 11 Replies View Related

Excel 2007 :: Formulas In Cells Not Being Recognized As Formulas?

Jan 10, 2013

I am running Excel 2007 on Windows Vista Business 32 bit. Recently I have noticed that if I enter a formula into an empty, unsused cell, it is recognized as a formula. If I modify that formula, it is then recognized as text and does not work as a formula. The only way I can get the cell to recognize a formula is to delete the cell and start over. This same scenario does not occur on previously stored workbooks. I have checked all of the flags that I know about, including the Options function.

View 3 Replies View Related

Paste Formulas As Values (strip Out Unwanted Formulas)

May 13, 2008

I have a macro running this code to strip out unwanted formulas and formatting.

Sub Quote_Wrapup()
'To stop screen flicker
Application.ScreenUpdating = False

Range("CDandC").ClearContents
Range("qdata5,qdata6").Font.ColorIndex = 2

'To delete delivery address lines if 1st line empty
If IsEmpty(Range("deliver_line1")) _
Then Sheets(1).Range("deliver_rows").EntireRow.Delete
'No End If required as only one action as a result of the If

Range("Item_Nos").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Columns("A:E") = Columns("A:E").Value .........................

A spreadsheet based on my template has been sent to me because the macro won't run properly. When I try to run the macro I get a Runtime Error '1004' Method 'Range' of object '_Global' failed on the following line. Columns("A:E") = Columns("A:E").Value.

View 4 Replies View Related

Hide Formulas From Formula Bar While Still Having Formulas Active?

Jan 16, 2014

Is it possible to hide formulas from the formula bar while still having the formulas active?

View 8 Replies View Related

Using Two IF Formulas (3 Or More To Count If Other IF Formulas Are Actually Returning A Value)

Aug 24, 2009

I have a spreadhseet with various functions on it and what I am trying to do is this.

Cell E4 returns a >35 or <35 true or false value
Cell G4 is either blank or has "Yes" text type into it.

What I am trying to do is get cell F4 to return certain arguments.

E4 = >35 and G4 is blank I want it to state "Email Hiring Manager"
E4 = ,35 and G4 is blank I want it to state "Wait"

I have a basic IF formula that returns this
=IF(E4>35,"Email Hiring Manager","Wait")

Then if cell G4 is populated with a Yes the formula needs to overwirte the origonal if with the return arguments of
=IF(G4="Yes","Email Agency","Email Hiring Manager")

If yes then what would be Email Hiring Manager (yes will only be input if E4 is greater than 35) will be overwritten with "Email Agency"

Can this be done with two If formulas or does there need to be 3 or more to count if other IF formulas are actually returning a value?

View 5 Replies View Related

Convert Formulas In Text Into Formulas

Dec 12, 2007

If you have a cell with the value ="2*c2+3" NB: (Notice the ""), then to make excel convert the formula in another cell to =2*c2+3 (notice the removal of ""), so that it can calculate the value of the cell instead of showing a textstring?

View 11 Replies View Related

Formulas Won't Calculate. Just Displaying As Formulas

Dec 11, 2008

I have formulas in a column and they are working unless I edit them to include another function, more cells, whatever, then they display as formulas instead of the result. I've gone to Tools --> Options --> View and the Formulas box is not checked. As well automatic calculation is on not manual.

View 4 Replies View Related

Double Sum If

Mar 25, 2009

Let me show you how my sheet is set up.

Steeves 10 ny
Steeves 15 ny
Steeves 20 nv
Steeves 5 tn
Steeves 10 ca
Keppler 16 tx
Keppler 20 nj

Now for this example I need to sum column B if A=Steeves and C=NY.

In this example it would return 25.

View 9 Replies View Related

Double Inequations

Nov 24, 2008

Is it possible to enter double inequations? Excel returns "false" even it is obviously true. If I type =1<2<3 the result is "false".

I can get the correct result using =and(1<2,2<3), but that makes it longer, and if I have more formulas inside instead of numbers I'll have to repeat the middle one, it will take the place, but only in oreder to compare it again.

Is there anything that can be done with this?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved