I've worked with excel formulas for a while now and can't quite figure out where my logic is flawed.
My goal is to increment a specific cell by 1 every time a range of cells contains the word "Active"
I thought I could do this by using the command: "=SUM(IF(B2:B50="Active",1,0))"
Can someone tell me what im doing wrong?
Maybe you want something like:
=COUNTIF(B2:B50,"Active")
Related
Sorry if this is a old question, I have a requirement to have a value pushed from a cell on one sheet to another cell on anaother sheet, without setting the destination cell.
So: 'Sheet1!A1' has formula, 'Sheet2!A2' is where I would like the output to end up without setting the cell with ='Sheet!A1' or using VBA, otherwise we would not be here right now.
It seems like a simple ask the beginning but I'm stumped
The cell in the other sheet cannot have the answer and also be blank. You can, however, set the colour of the text to be the same as the background.
My first post here, maybe someone will be able to help.
I have a large Excel table with data from labs. Some results are below LOD And I need to remove them as I do not need them.
So basically I need to clear data in one cell, say E11, if data in D11 shows "<". Meaning below LOD.
If possible I would like to replace value in E11 with "-".
Is there any one who could help me please.
There are a few ways to go about this and you don't really need VBA.
Without VBA - Create a filter on your results and simply filter away the "<" - you could copy and paste this filtered table to another sheet
You could use a cell formula to help you identify results: =IF(A1="<","",B1) which would look at A1, if A1 was a < then it'd return nothing, otherwise it'll return value in cell B1.
With VBA - you'd basically be applying the same logic, just written in code. If you really want to do this, then look up how to do a loop first and how to use IF logic...
enter image description here
This is the worksheet I work with. I would like to clear all the values where < is next to them. This is just part of much bigger table.
I am sure this is really simple but cannot get it to work. I am trying to do some conditional formatting on a sheet that over time will have additional columns added to it. I want the formatting to be there before hand since the data is being added via VBA and the person using the spreadsheet are not Excel experts.
What I have is a column with numbers in. When a new column is entered I want to compare the value with the value in the previous column and then colour the cell accordingly. I can do this for a single cell with for example "=D2>C2".
I want to be able to write the rules in cell D2 comparing it with cell C2 and then have the rules apply across the area D2:DDD300. So for example cell N19 will compare itself to cell M19.
I thought I could use the "Applies to" box but that does not work. Any ideas on how I can achieve this?
Okay this now appears to be working. Not sure what I did differently but deleted all the rules and then set them up again. The only thing I did different was to initially do it for just the 1 cell, then expanded it out to the row when I knew it was working, then finally the whole area.
Sorry to have wasted peoples time
Your method should work. It does for me. Maybe this helps:
I'm currently working on a massive file, that compares year/year data.
Every week I need to update a formula in the file to move down a row. I want to make a command button to update these formulas.
Here is a simple example
cell c800 contains: =((C235-C229)/C229)*100
I would like to click the button to make the cell update to
=((C236-C330)/C330)*100
Can anyone help me out here? is this possible? I've been looking all over for this and can't find anything.
thanks
Enter this formula in C800 and it will always capture any newly added lines of data.
=(INDEX(C5:C799,MATCH(1E+99,C5:C779,1))-INDEX(C5:C799,MATCH(1E+99,C5:C779,1)-6))/INDEX(C5:C799,MATCH(1E+99,C5:C779,1)-6)*100
assumes first data point is in C5. Change as needed
This works because MATCH(1E+99,C5:C799,-1) finds the last numerical value in the column.
there is a function to do that, as if the cell containing the formula was copied somewhere else and the cell references in the formula were shifted/moved:
strFormulaMoved$ = Application.ConvertFormula(Application.ConvertFormula(Selection.Formula, XlReferenceStyle.xlA1, XlReferenceStyle.xlR1C1, , Range("C800")), XlReferenceStyle.xlR1C1, XlReferenceStyle.xlA1, , Range("C800").Offset(1, 0))
This is probably very easy for experienced user of excel, but I couldn't find a way to do this, so I asking this question.
I have particular range of cells, let's say E5:M5, only one cell of this range will contain 1, other will contain 0. I want to reference, first cell of that column (which contains label). I want to do this by using a formula in another cell. In the end, that another cell should have label name as its value.
I wanted to post image elaborating what I want, but it seems I can't do that.
Anyway, can anyone tell me how this can be done?
I'm going to assume you want to use a formula rather than VBA as it is not recommended for inexperienced Excel users to use VBA. Use this formula to determine the first column out of your set, which has "1" as a value:
=match(1,E5:M5,0)
If by 'label name' you mean you have a header or something (let's assume in row 4), you can use the index function to pull the value from the mirror set of rows above the match function, like so:
=index(E4:M4,match(1,E5:M5,0))