In excel, I have multiple sheets each with a column of numbers. I have it set up to highlight any cell that is a duplicate of a value on any sheet in the same column.
Also, how to have the sheet name(s) displayed in a cell to the left of the duplicate values?
For example; if I have sheetA, sheetB, and sheetC, each with a Number column, if I enter a value on sheetC that already exists on sheetA both cells will be highlighted. I would also like on sheetC the cell next to the duplicate value to change to "sheetA" indicating that the duplicate value is on sheetA.
I haven't been able to find any information that would even being to point me in the right direction.
Formula for in which sheet number is found:
=TEXTJOIN(", ";TRUE;IF(COUNTIF(shee1!$A$1:$A$30;Sheet3!A1)>0;"Sheet1";"");IF(COUNTIF(Sheet2!$A$1:$A$30;Sheet3!A1)>0;"Sheet2";""))
Formula for conditonal formatting (for sheet 3, do similar with other sheets):
=ISNUMBER(MATCH(A1;VSTACK(shee1!$A$1:$A$30;Sheet2!$A$1:$A$30);0))
For i = 1 To staffelRange.Rows.Count
.DataBodyRange.Cells(i, countHeader).Formula = staffelRange.Cells(i).Formula
Next
the code works as intended and copies the formulas from my range into the desired range in my table. first to the formula, the formula always refers to the column header and the cell left of it, if i copy the code now with my function from column 1 to for example column 4, the formula still refers to column 1 instead of column 4. but if i copy it by dragging the formula over to the other cell, the formula adapts. How can I achieve such an adjustment in my code?
Formula:
=$G39*(1+SVERWEIS(Stückpreise_neu_19[[#Kopfzeilen];[Staffel1]];Rabattstaffel_new_24;2;FALSCH))
If the formula is always the same except for the cell reference, you can just write the formula to sheet as a string value with a variable for the correct row number.
Something like...
For i = 1 To staffelRange.Rows.Count
.DataBodyRange.Cells(i, countHeader).Formula = "=$G" & i & "*1+SVERWEIS(Stückpreise_neu_19[[#Kopfzeilen];Staffel1]];Rabattstaffel_new_24;2;FALSCH))"
Next
This is assuming your variable i represents the correct row number for the formula (which to my understanding is correct).
I have excel like this
and i need to copy value to another sheet by this pattern
i just try to copy but value incorrect because there pair by row cell over sheet
How can i copy and get value in each row value thank you.
Copy the formula below on the first cell of any column of the same sheet and copy it all the column down:
=+IF(MOD(ROW(A1),4)=1,"NAME",IF(MOD(ROW(A1),4)=3,CONCATENATE("value ",INDEX(B:B,QUOTIENT(ROW(A1),4)+2)),""))
See screenshot of the result.
I'm trying to make a worksheet where one column automatically numbers based on the value of another cell.
If the cell in the first column says 'MSG', the value in the next cell, should be something like MSGRA15_00001, if in another row, the first cell is also MSG, the value in the next cell should become MSGRA15_00002.
If the value in the first column says SEL the returned value in the next column should be SELRA15_00001 and so on...
Cell numbering based on previous cell
Can anyone help me on this?
Thanks a lot!
Assuming your MSG/SEL-column is in range A1:A?, you can paste
=A1&"RA15_"&TEXT(COUNTIF(A$1:A1;A1);"00000")
Into B1 and then copy and paste it from there.
I am working with a list of data where one or multiple cells in a row can be blank.
Lets say the list is cells A1, A2, A3, A4. I am trying to create a function that will do the following:
IF A1 has a value I want the cell to return A1.
IF A1 is empty then I want it to return A2.
IF A1 and A2 are both empty I want it to return A3.
If A1, A2 and A3 are all empty I want it to return A4.
first result on google: http://chandoo.org/wp/2014/01/15/find-first-non-blank-item-in-a-list-excel-formulas/
This formula returns the first TEXT cell for a range B1:B100:
=VLOOKUP("*", B1:B100, 1,FALSE)
* is a wild card in Excel. When you ask VLOOKUP to find *, it finds the first cell that contains anything.
NOTE: This approach finds first cell that contains any TEXT. So if the first non-blank cell is a number (or date, % or Boolean value), the formula shows next cell that contains text.
If you need to find non-blank that url gives the following solution:
If you want to find first non-blank value, whether it is text or number, then you can use below array formula.
=INDEX(B1:B100, MATCH(FALSE, ISBLANK(B1:B100), 0))
Make sure you press CTRL+Shift+Enter after typing this formula.
How this formula works?
ISBLANK(B1:B100) portion: This gives us list of TRUE / FALSE values depending on the 98 cells in B1:B100 are blank or not. It looks like this:
{TRUE;TRUE;TRUE;FALSE;FALSE;FALSE;FALSE; ...}
MATCH(FALSE, ISBLANK(…), 0) portion: Once we have the TRUE / FALSE values, we just need to find the first FALSE value (ie, first non-blank cell). That is what this MATCH function does. It finds an exact match of FALSE value in the list.
INDEX(B1:B100, MATCH(…)) portion: Once we know which cell is the first non-blank cell, we need its value. That is what INDEX does.
As indicated in your comment on your question, you have 500 rows interspersed with blank cells. You want to fill blank cells with the value of the last non blank cell.
I'd write some VBA code that'd work as follows: select the range of cells you want to back fill and run this VBA:
Sub fillBlanks()
For Each c In Selection.Cells
If c.Value <> "" Then
lastVal = c.Value
Else
c.Value = lastVal
End If
Next c
End Sub
basically, if the cell is empty, use the value of the last non blank cell (if there were no blank cells above, it will remain blank). Else, if the cell is not empty, save this as the last non blank cell. Repeat for every cell in the selected range.
Step by Step instructions on using this vba code - for this sample worksheet:
Make sure the range is selected, press ALT+F11.
This should open the Visual Basic Editor:
Press F7, This should bring up the code for the activesheet. Paste the VB code from above:
Press F5 (or use the menu to run the code).
The end result should be as follows:
Select ColumnA:
HOME > Editing > Find & Select > Go To Special... > Blanks, OK, =, ↓, Ctrl+Enter.
You can just put a rank.eq formula in the column next to it, and do a vlookup to bring all of your data to the top. This will bring all of your data to the top.
For example, in the image below I am ranking using the percentage, I want to bring the cells with data to the top for presentation, I will hide all columns other than where my vlookups are.
This did the trick for me
=LOOKUP(2,1/(A1:A13<>""),A1:A13)
Source credit: here