MOD Operator Ambiguity

Jun 30, 2008

MOD Operator gives one result when this is used as worksheet function and the different one when I use that in VBA.

Cell A1 = 01-Jan-08
Cell A2 = 02-Jan-08

In Worksheet
=MOD(A1-A2,8) Gives 7

In VBA
Reminder = Range("A1")-Range("A2") Mod 8 Gives -1

View 9 Replies


ADVERTISEMENT

-- An Operator

Jan 25, 2009

I have on occaision seen -- within a formula. e.g =SUMPRODUCT(--(PMonth=$A3),--(PName=$A$1),PLTime). Could someone explain the relavance/effect or use of this as it seems outside of standard operators.

View 9 Replies View Related

How To Use LIKE Operator

May 25, 2012

How to use the LIKE operator? I have tried:

mytable.field like '098'
mytable.field like '098'
mytable.field like '&098&'
mytable.field like '*098*'

This is in A SQL string connecting to a MSSQL db over ODBC

View 3 Replies View Related

Between Operator

Feb 9, 2007

Excel has operators for Less than, Greater than, Equal to, etc., etc. Does anyone know if there is a Between operator? (Maybe an undocumented or little-known feature like DATEDIF)?

There is a Between Feature in the Conditional Formatting Dialog Box - it would sure be nice to be able to use it in a non-formatting formula, or maybe you could explain how you pros achieve a "between" result without resorting to VBA.

View 9 Replies View Related

Not Equal To Operator

Feb 12, 2009

revised this code to reflect the "not equal to". I want the user to only enter "In" or "Out." Therefore, If cells b19:B26 does not have either word, then the message box will prompt the user to enter the correct word again. I think my code needs to be revised into some kind of loop.

View 9 Replies View Related

Trying To Filter Data Using The Like Operator

Aug 20, 2009

I'm using the below code to get only those rows which contains 'Deploy' or 'Pre-prod' but it gives less rows than its supposed to do.

View 11 Replies View Related

(Select Case) With AND Operator?

Jan 7, 2013

While proof-reading my code, I've noticed that these two true select cases ("S" and "W") shown below wouldn't "yield" what I want. I've tried to replace AND (highlighted in red) with "," (comma) but I still get the same result - it still returns a value evaluating either one of two conditions but not BOTH:

Code:
sChar = Split(Waypoint, ",")
For j = LBound(sChar) To UBound(sChar) Step 3
Lat = sChar(j)
Lon = sChar(j + 1)
Elev = Val(sChar(j + 2))
Next j

[code].....

View 3 Replies View Related

How Can I Look For A Character Or An Operator In A FORMULA

Jul 9, 2008

Iīm trying to find a way to get a formula which can look if there is a character (letīs say it is "-") in a formula which is, by the way, variable (letīs say each cell has different values like: =899+59-6 and so it goes and goes), and brings me a true or false value.

Specifically it is like this:

I have formulas to be evaluated like the following:

=899+59-6

I need a formula which can look into the formula and if it finds the character "-" or a "+", brings me a true or false message.

View 9 Replies View Related

Variable As Comparison Operator

Aug 16, 2007

Can you use a variable as an operator? For example:

Dim op
op = ">"
If Var1 op Var2 Then MsgBox "It Works!"

I have parameters stored in a database and each parameter includes an operator. When I compare a given value to the parameter, I was hoping to do that dynamically by extracting the operator from the parameter and using that in the comparison.
Otherwise, the only way I can see to do it is create a Function with a Select Case list for all the operators to check the parameter, do the comparison, then return the value to the Function.

View 2 Replies View Related

Pivot Table Filters With OR Operator?

Nov 26, 2013

filter a pivot table that contains these 3 column fields: User 1, User 2, and User 3.

However, when I want to see the results for "John" in all those fields, I need to use one filter at a time. Is there any other way to see all results of the Pivot Table where "John" is a User, no matter if he is the 1, 2 or 3 user?

View 3 Replies View Related

How To Use Between Operator In AND Function While Doing Conditional Formatting

Oct 5, 2013

I have three columns named "Type" , "start_date" and "end_date".

Type column can hold only "A","B" and "C".
start_date and end_date columns are time stamps. ex: 9/14/13 9:35 AM

I want to do conditional formatting like,

If type = "A" and (end_date - start_date) value between 30 and 40 (in hrs) then it should be amber.

I did for greater than and lesser than values, but I am facing problem while doing the above one.

View 3 Replies View Related

Like Operator Not Working For Character List

Aug 14, 2014

When I run this code it does the exact opposite of what I want it do (if not contained in that character list then delete). So basically if it not in the character list then delete, but it if is in the character list it deletes....

[Code] .....

View 4 Replies View Related

Arithmetic Operator From Cell Reference

Jul 23, 2014

I need to switch between less than or greater than in my formula based on user selected drop down that gives the user two options "" My formula has "

View 9 Replies View Related

Operator To Find A Word In A Sentence

Jul 26, 2006

I dont have much experience with VBA and im looking for an operator that helps me find a word (or part of a word) in a sentence located in a cell. I have to do this to create a user friendly form. I cant use the Find option in excel because i need to do this in a form.

View 3 Replies View Related

How Like Operator Work With Brackets And Number Tags

Feb 26, 2014

How the like operator works with brackets and # tags etc...

View 9 Replies View Related

Adding Logical Operator To Line Of Code

Nov 4, 2009

I'm just trying to add the "=" operator to the below "" operators, as this line of code presently doesn't account for any numeric matches, of which I have plenty, and DO need to account for! Gosh, might someone here know how to integrate such a thing into this code?

If Range("I3") Temp Then Range("I1") = Temp

View 9 Replies View Related

Excel 2003 :: Compare Two Dates With Dynamic Operator

Apr 18, 2013

I'm using Excel 2003.

I have a Userform where you can enter a date and select a comparison operator from a combo box. Any one of these (= < <= > >= <>)

In VBA I then load a range into a dictionary object and then loop thru it to compare the dates in the dictionary to the date selected in the userform but I can't get the dates to compare correctly. I think it has something to do with the Evaluate function comparing the dates as strings but I'm not really sure.

VB:
For Each strKey In dictValid.Keys()
If Not Evaluate(CDate(dictValid(strKey)) & cboDteOperator.Value & CDate(txtDteSel.Value)) Then

View 3 Replies View Related

Excel 2010 :: Where Are Mathematical Operator Signs In Menus

Mar 9, 2012

We have just been upgraded to Excel 2010 with it's hideous menus. tell me where to find =, +,-,* and / signs in the menus before I go mad!

View 6 Replies View Related

Date Formula With Variable Date & Comparison Operator

May 14, 2008

I have a date in cell A1. I have an operator in cell A2. This info is then merged in to cell A3 with the following formula: =A2&TEXT(A1,"dd/mm/yyyy"). My data range is called "wc_date_of_loss". I want to use this info in a SUMPRODUCT formula (as the dates and operators can be changed by the end user). What's the correct syntax for that?

=SUMPRODUCT(--(wc_date_of_loss&A3))
=SUMPRODUCT(--(wc_date_of_loss=A3))
=SUMPRODUCT(--(wc_date_of_loss=TEXT(A2&A1,"general,dd/mm/yyyy")))

View 6 Replies View Related

Copy All Formulas With Out Operator "="

Oct 23, 2009

How Can I Copy All My Formulas In Worksheet With Out Operator "="

Like Copy Paste Special

View 9 Replies View Related

Database Function In Which I Cannot Use An "OR" Operator

Sep 8, 2007

I have a database function in which I cannot use an "OR" operator. I can add "+" on to another (Ex. Sum(a1:b1)+sum(b2:c3)). The function itself is 80-90 characters long. So after I add a few together the cell runs out of capacity. I have a analysis that simply does not lend itself to listing out individual functions and then summing them.

View 3 Replies View Related

&quot;CONTAINS&quot; Operator

Aug 16, 2006

I am using excel 2002. I want a cell to use conditional formating, whereby say IF CELL A1 CONTAINS "ORDER" THEN A2 WILL TURN A SPECIFIC COLOR.

I can easily figure this out if A1 EQUALS "ORDER", but can't figure out the operator or trick for CONTAINS ...

I've tried =A1="*ORDER*" but it doesn't work . . .

View 11 Replies View Related

Use "<>" Operator

Jun 21, 2006

What does this operator do?

View 2 Replies View Related







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