excel-formula

REGEX to validate excel like mathematical expressions

I'd like to know how to create a regex to validate a function like this: =TRIMESTER(1,2,2008) The first parameter should be any integer. The second parameter is an integer that shouldn't be higher than 4. The third parameter is a year (4 digits) ...

Getting special character in getting contents of formula based cell using JXL API in Java

I am facing a problem while getting contents of cell using the JXL API, if I am using a formula in an Excel sheet. Right now I am using the formula IF($L10="","",+ROUND($L10*1.375,3)) in each cell, but when the cell value is blank I am getting junk characters when I call the cell.getContents() method. The code snip is as follows. Work...

How do I set Excel formulas with Win32::OLE?

Hello, can anybody tell me, why the "...->{FormulaR1C1} = '=SUMME( "R[-3]C:R[-1]C" )';" doesn't work. In the Cell where should appear the result I get "#Wert!" ( maybe "Value" in English ). With the WENN(IF)-formula I get what I expect. #!C:\Perl\bin\perl.exe use warnings; use strict; use Win32::OLE qw; use Win32::OLE::Const 'Micro...

Count unique values in Excel

I need to count unique values in range (C2:C2080) in excel. Googled formula: =SUM(IF(FREQUENCY(MATCH(C2:C2080;C2:C2080;0);MATCH(C2:C280;C2:C2080;0))>0;1)) return incorrect value. UPD: Lame solution: Sub CountUnique() Dim i, count, j As Integer count = 1 For i = 1 To 470 flag = False If count > 1 Then For j = 1 To ...

Filtering and then counting distinct values

This is for Excel: I've been tasked with counting distinct records after I have filtered the data. I have 330 rows with column A containing the 'name' and in Column B I have the name of a test that was done for each 'name', which each 'name' could have taken several iterations of the same test. The test results are in Column C. Col...

How to circumvent the depth limitation of Excel's IF function?

For an Excel formula I need the first cell out of a list of cells which contains a numeric value: A | B | C | ... | Z | ----------------------------- | 0.1 | 0.4 | ... | =0.1 | | 0.2 | ... | =0.2 I use this schema: IF(ISNUMERIC(A1);A1;IF(ISNUMERIC(B1);A2;IF(ISNUMERIC(C1);C1;IF(...)))))))) Unfortunately this only...

Strip characters from a string in Excel.

I want to strip off the last character in a string on a given cell. I was trying to use the following formula: =LEFT(A2, LEN(A2)-1) This pisses off Excel as it is a circular reference on cell A2... I'm terrible with Excel formulas... any help is greatly appreciated. Thanks. ...

[Excel] Populate list via a bi-Condition

Hello excel-world, im interested to implement something but im not sure if it would be possible and would like your intake on it. here is my scenario: i will have two validation cells which will be shown as List that I will pick from. those are my condition that i would like to meet and ommit my list from a database. I have a list of...

Is this the RegEx for matching any cell reference in an Excel formula?

I have been trying to create a regular expressions pattern that matches any reference in any Excel formula, including absolute, relative, and external references. I need to return the entire reference, including the worksheet and workbook name. I haven't been able to find exhaustive documentation about Excel A1-notation, but with a lot...

Excel: need help with unusual lookup function (sorted column is different from lookup column)

Hello, I am having trouble constructing a unusual lookup formula in Excel. Normally, I would use VLOOKUP(), but the pitfall is that I want to look up a number in a column from a table that is sorted on an other column. Vlookup can only lookup things on the sorted column itself. The scenario is as follows: The table is sorted ascend...

DSUM: How to define the criteria range using braces?

I think that it's easier to explain my problem with an example: Based on the spreadsheet above, the formula =DSUM(A4:D8,B4,A1:A2) works, returning 20. Why =DSUM(A4:D8,B4,{"OrderID";">10567"}) does not work? (It returns #VALUE!) ...

how to Vlookup a value on a worksheet not present on the first column?

I have seen that VLOOKUP excel formula looks for a value on the first column of an another worksheet. How can I achieve a similar search of a value which is not on the first column. Lets have a worksheet1 with values as follows: xx value1 index1 yy xx value2 index2 yy xx value3 index3 yy I would like to fetch the value3 by searching ...

Excel function: Which value is larger

In Excel, is there a native function that will return the larger of two values? I'm looking to avoid using the IF function. I'm using Excel 2010 Beta if that's worth anything. For example: GTR(66,24) will return 66. ...

Between a range of values in excel 2007

I have a column of numbers in Excel 2007, for example: 19 35 29 62 What i want to do is: If the value is between 0-20 replace the value with 0.1 If the value is between 20-25 replace it with 0.2 The bin sizes are not going to be the same (0-20, 20-25, 30-50, 50-60, 65+) etc, and the values to replace the numbers with are not necessar...

Locate matching values in different XLS sheets and copy other cell values from matching row.

Sheet1 column B contains my customer number- I need to locate this customer number in Sheet2 column F. Then copy the value from Sheet2 AE (from the row with the matching customer number) into the matching customer number row in Sheet1 column E. Note that sheet1 column B and Sheet2 column F contain the same customer numbers, but not in ...

Can we put a formula in the "value_if_true" field in an IF Function in Excel?

I have a situation where i need to put a formula in the "Value_if_true" and "Value_if_false" fields in an IF function but it does not seems to be working. It just keeps displaying my formula as is in the cell. Can someone help? ...

how to get data in sheet2 from sheet1 in excel

I have two worksheets, Sheet1 Column A = Deptname Column B = Headname Column C = Username Sheet2 Column A = Headname (???) Column B = Username Column C = UserID "Headname" column in Sheet2 is blank and what I wanted to do is to get "Headname" from Sheet1 by using "Username". I have tried to use VLookup but it did not work if user...

Excel text formula to extract words separated by semicolons in a field

A field in Excel contains words separated by semicolons, e.g.: A1 = save;the;national;treasure;for;good How can I apply Excel text formulas to produce separate words from this field in another fields? E.g.: A2 should contain a formula to get the first word ("save") A3 should contain a (different) formula to get the second word ("t...

Convert content from excel cells from string duration to number of minutes

Hi All, I have Excel file with cells content like 6h 18 m I.e. this cells contain duration values. I need to add new column to this spreadsheet where I will use values from exisitng ones in minutes. For example: cell A1 = 6h 18 m I want to add new cell with formula like = convertToMinutes(A1) + 5 Can anybody halp me? ...

Excel: parse text as formula

I would like to have part of an excel formula be dynamic, other than a cell reference. For instance, suppose that in column A (cells A1:A99) I have a bunch of numbers, and I want to know how many of those numbers are greater than 50. If I wanted this calculation to be static, I could simply use one of the following: =COUNTIF($A$1:$A$9...