Questions tagged [worksheet-function]

A worksheet function is represented by a keyword in an Excel formula that performs some action on input and returns output to the calling procedure, either a worksheet cell or another function.

A worksheet function is represented by a keyword in an that performs some action on input and returns output to the calling procedure, either a worksheet cell or another function.

Worksheet functions may be used in as well, returning output to a VBA function.

The tag should be distinguished from the tag. If your question is about specific functions and what they do, use the tag. If you are asking about a formula you've written that doesn't return the result you expect, use the tag.

Links:

1336 questions
224
votes
21 answers

Get the last non-empty cell in a column in Google Sheets

I use the following function =DAYS360(A2, A35) to calculate the difference between two dates in my column. However, the column is ever expanding and I currently have to manually change 'A35' as I update my spreadsheet. Is there a way (in Google…
Michael S
  • 4,352
  • 5
  • 23
  • 29
148
votes
16 answers

IF statement: how to leave cell blank if condition is false ("" does not work)

I would like to write an IF statement, where the cell is left blank if the condition is FALSE. Note that, if the following formula is entered in C1 (for which the condition is false) for example: =IF(A1=1,B1,"") and if C1 is tested for being blank…
Mayou
  • 8,498
  • 16
  • 59
  • 98
132
votes
26 answers

Last non-empty cell in a column

Does anyone know the formula to find the value of the last non-empty cell in a column, in Microsoft Excel?
Michael S
  • 4,352
  • 5
  • 23
  • 29
90
votes
9 answers

How to turn a string formula into a "real" formula?

I have 0,4*A1 in a cell (as a string). How can convert this "string formula" into a real formula and calculate its value, in another cell?
Cloaky
  • 1,065
  • 2
  • 10
  • 11
82
votes
13 answers

Excel Reference To Current Cell

How do I obtain a reference to the current cell? For example, if I want to display the width of column A, I could use the following: =CELL("width", A2) However, I want the formula to be something like this: =CELL("width", THIS_CELL)
Steven
  • 13,501
  • 27
  • 102
  • 146
63
votes
4 answers

Excel formula to get cell color

I would like to know if we can find out the Color of the CELL with the help of any inline formula (without using any macros) I'm using Home User Office package 2010.
Praveen
  • 1,387
  • 1
  • 12
  • 22
55
votes
6 answers

Concatenating date with a string in Excel

I have two cells in Excel. one has a string and the other one has a date. in the third cell I want to put the date and the string together. For example: A1 = "This " A2 = "03/03/1982" I want A3 to be: This 03/03/1982 when I try to put this in the…
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
55
votes
8 answers

Use string value from a cell to access worksheet of same name

I have 2 worksheets: Summary and SERVER-ONE. In cell A5 on the Summary worksheet, I have added the value SERVER-ONE. Next to it, in cell B5, I would like a formula that uses the value in A5 to display the value of G7 in the worksheet of the same…
KingBob
  • 792
  • 2
  • 6
  • 14
50
votes
12 answers

Case Function Equivalent in Excel

I have an interesting challenge - I need to run a check on the following data in Excel: | A - B - C - D | |------|------|------|------| | 36 | 0 | 0 | x | | 0 | 600 | 700 | x | |___________________________| You'll…
Nic
  • 13,287
  • 7
  • 40
  • 42
41
votes
7 answers

Get values from other sheet using VBA

I want to get values from other sheets. I have some values in Excel (sheet2) for example: A B C D - - - - 1 | 2 5 9 12 2 | 5 8 4 5 3 | 3 1 2 6 I sum each column in row 4. I'm working with these values in sheet2 but I want…
Apollon1954
  • 1,388
  • 4
  • 16
  • 33
38
votes
10 answers

How do I slice an array in Excel VBA?

What function can I use in Excel VBA to slice an array?
Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
36
votes
3 answers

Convert date field into text in Excel

I have an Excel file which has a column formatted as date in the format dd-mm-YYYY. I need to convert that field to text. If I change the field type excel converts it to a strange value (like 40603). I tried the text function but it gives me Error…
brpaz
  • 3,618
  • 9
  • 48
  • 75
35
votes
3 answers

How can I substitute quotation marks in Excel with SUBSTITUTE formula?

I have worksheet where I need named ranges to correspond to the contents of another cell. The text in the cell is something like: Partitions w Studs 16" oc Named ranges cannot have spaces, or most importantly, special characters like ". So, the…
Excellll
  • 5,609
  • 4
  • 38
  • 55
29
votes
3 answers

Using built-in spreadsheet functions in a script

I'm using Google App Script for the first time. I'm using it on a Google Doc spreadsheet. I'm trying very simple functions, just to learn the basics. For example this works: function test_hello() { return 'hello'; } But I'm puzzled by this…
28
votes
6 answers

How to show current user name in a cell?

In most of the online resource I can find usually show me how to retrieve this information in VBA. Is there any direct way to get this information in a cell? For example as simple as =ENVIRON('User') (which did not work)
Anthony Kong
  • 37,791
  • 46
  • 172
  • 304
1
2 3
88 89