thank you for reading this.
I have a row containing a list of text.
APA
VEN
GRAB
I have a table containing either I or Super. Below the table, there are corresponding text such as APA, VEN, GRAB or blank formula cells.
I want to get the cells above a non-blank formula cell. For example, in the row APA, VEN, GRAB that I have..
I want APA to return the value of 5 cells above it. I know how to return one value above it (i.e. Super), but I am not sure how to get the 4 cells above Super.
APA I I I I Super
VEN
GRAB
Edit: =INDEX(AZ53:BA57,MATCH(BA58,BA53:BA57,0)-1,0) This is what I tried to return the cell above APA. I am trying to figure out how to return the 5 cells above APA.
I know I can enter formula to each cell. I wanted to do it in a formula if possible. Thank you again.
=INDEX(AZ53:BZ57,MATCH(BA58,BA53:BA57,0)-2,0)
=INDEX(AZ53:BZ57,MATCH(BA58,BA53:BA57,0)-3,0)
=INDEX(AZ53:BZ57,MATCH(BA58,BA53:BA57,0)-4,0)
=INDEX(AZ53:BZ57,MATCH(BA58,BA53:BA57,0)-5,0)
enter image description here
Answer based on inital question
Cell F10 contains the following formula =INDEX(F:F;ROW(F$10)+INDEX($C$2:$C$4;MATCH(F$9;$B$2:$B$4;0))-1) which has then be copied to G10 and I10.
I used the area B2:C4 to define the negative offsets for your non-blank content. As the field in which I display the result of the formula is one row below your non-blank content I added an additional -1 to the formula.
The grey numbers and the yellow highlights have been used to quickly validate the outcome.
Update based on questioner's comment
According to your instructions, source ranges (purple) would intersect with target ranges (blue), see cells with red border.
As it is not possible to put both a formula and a value into the same cell, I assumed that you wanted to explain independently
how the target should be structured and
how the source should be structured.
Hence, it looks like you are looking for a formula that transposes your values from columns into rows.
In the above image, the highlighted cells contain the following formula (example for cell S14):
=OFFSET(source_anchor,COLUMN(S14)-COLUMN(target_anchor),ROW(S14)-ROW(target_anchor))
source_anchor refers to cell Q3
target_anchor refers to cell R13
Please let me know if this is what you are looking for. If it is not the case, then please provide a mock-up.
Related
I would like a cell to change color if the value entered is identical to a value entered in that same column elsewhere AND the values in another column also match.
Ex: One employee cannot obtain the same prize twice. In column D, we
put the employee number. In column G, we place the prize product
number.
I want it so that if the employee number and product number are entered a second time, that the prize product number cell be highlighted in yellow (which would mean the employee has already received this prize).
Your questions is actually about Conditional Formatting and of course it needs to incorporate Excel Formula.
I have added a helper column called Check to help explaining my logic, but you do not have to insert such column in your actual worksheet.
The formula in cell H2 (see below picture) is: {=SUM(--($D2&$G2=Employee_No&Prize_No))>1}
It is an ARRAY FORMULA so you need to press Ctrl+Shift+Enter upon finishing the formula.
This formula will find out if an employee has received the same prize more than once, if so it will return TRUE.
If you know how to use formula in Conditional Formatting, then it is just a matter of copying and paste the formula to Conditional Formatting section for the right range of cells.
Please see below steps:
Let me know if you have any questions. Cheers :)
I'm trying to create a form in excel for my team to fill out which highlights certain cells in a row as compulsory (format the cell colour) based on the number from a table in another sheet which has 3 preset dimensions ("M"=Mandatory, "P"=Prohibited, "O"=Optional) for each number across multiple analysis field.
I have tried conditional formatting formulas to highlight the cell to fill out if the lookup of the number chosen returns "M") but I don't seem to have a formula which validated this and returns with the cell highlighted when it needs to completed.
I would like the formula to return the cell as highlighted if it is mandatory based on the lookup to the table and need the user to fill out the cell with the information relevant.
Any help would be much appreciated.
If I understand your question correctly you just want the cell to highlight when its sister cell in another sheet is coded "M". That's a fairly easy formula.
=Sheet2!$B1="M"
This is for a straight column in B, where the cell it's checking against is in sheet 2 and also in column B. If it's for a row simply move the $ to say b$1.
If you want the highlight to disappear when the cell is filled in use this formula:
=AND($B1=0,Sheet2!$B1="M")
Photo of Spreadsheet
What I'm basically trying to do is have the cell E15 turn red when the percentage in J15 is less than or greater to 20%, and the cell K15 has the text: Plate.
I also want this effect to happen with all the cells in E15-E34, but for them to be based on their individual row. So, for example, E18 would turn red when K18 says: Plate and J18 is less than or greater to 20%. I don't know if I'm just going about this the wrong way, but if not, then how can I achieve what I need to?
I've tried removing the $ but they automatically reappear, any help would be greatly appreciated. See conditional formatting formula below. Photo of spreadsheet at beginning of text.
=AND(K15="Plate",J15>=20)
Column K is a selection of either Plate or Stiffener and Column J is a percentage based off a calculation of another cell.
In my above photo, I have setup a conditional format with two actions (ignore my values in the photo, and follow these steps).
First, Select Cell K15 to K19 (it is important to start at K15, or else you will have to modify the formula below).
Next, add a Conditional Format formula (below). Any cell reference within this formula MUST be relative to the K15 cell.
=IF($K15="Plate", AND($K15="Plate",$J15>=0.2), AND($K15="Stiffener", $J15>=0.25))
You could also use this bit of code which is much more flexible, as you can expand the number of items.
=OR(AND($K15="Plate", $J15>=0.2), AND($K15="Stiffener", $J15>=0.25))
I want to create a formula that looks up for a specific text in the range in provide or column and if it finds the text, write that text or the text in the right column in another cell. I am currently using this formula:
=LOOKUP("Haider",O11:O16,E1:E6)
However even when it can not find Haider in the range O11:O16, it still writes the text in the column E1:E6 to the cell in which I wrote the formula.
Also, as there would be only a single word in the entire column at one time, you
could help me with a formula that simply copies that word to a cell of my choice.
Another question is that how can I combine this with conditional formatting? For example, if I want to find the text and if it is found the range I specify, it should turn another cell into red or any color.
The first part of your question is answered in the comment from Byron Wall.
For the second part of the question, if you want to find the first or only cell containing text in a range, the formula is:-
=IFERROR(VLOOKUP("*", O11:O16, 1,FALSE),"")
If you want to find the first or only cell containing anything, the formula is
=IFERROR(INDEX(O11:O16,MATCH(TRUE,O11:O16<>"",0)),"")
but you have to enter it as an array formula using Ctrl-Shift-Enter.
For the last part of the question, supposing you wanted to highlight the cell in E1:E6 corresponding to the cell in O11:O16 containing "Haider", you would need the formula:-
=$O11="Haider"
(this compares E1 with O11, E2 with O12 etc. because of relative addressing)
Highlight E1 to E6.
Go to 'Conditional Formatting'.
Select 'New Rule' and 'Use a formula...' , enter the formula and choose a fill colour in the Format option.
Is there a away to format rows of cells, so when data is entered in A1, the rest of row A turns red? The reds will disappear as each row cell is updated? Something like this works =IF(A2="","",B2=""), but it only flags reds as you type
"A" is not a row. It is a column.
Edit Perhaps this -- it took me a while to understand what you wrote, even though, in retrospect, it was pretty clear.
An entry in column A highlights the rest of the row (up to column V)
An entry in any other cell removes the highlight from that single cell:
Formula:
=AND($A1<>"",A1="")
As I understand you want to highlight the whole row if only column A contains a value. If any other cell contains a value, the highlight shall disappear.
Select the desired rows and create a conditional format with this formula:
=AND(LEN($A1)>0,COUNTA(1:1)=1)