I'm trying to setup an excel sheet with different columns and in every column I need the single cells to have a specific ID so I can reach to those by code, the simpler one was to put for ex. "column name1" and incremental from there, do you know a method to make something like that instead of changing all the cells ID by hand?
enter image description here
Like this one for example, but intead of having 'feature1' 'feature2' ecc written as text I need those in the cells IDs/Names
EDIT
example of table
Here I want to use a formula to automatically change the name of the table from "A26" to "step1", I tried to use command ="step"&ROW(A26) but this only change the text of the cell instead of the name
Although I have shared above what ROW Function, does, still for a proper explanation I am sharing here
The ROW function returns the row number for a reference.
In our query, ROW(J26) returns 26, since J26 is the twenty sixth row of the column J in the spreadsheet. When no reference is provided, ROW returns the row number of the cell which contains the formula. So in the above query ROW() returns 26 which on subtracting with 25 shall give us 1 which is required.
ROW function takes just one argument, called reference, which may be empty, a cell reference, or a range.
So the formula used in cell J26
=J$25&ROW()-25
And Fill Down and for the rest just press CTRL R and fill down!
Related
I am building an excel sheet that returns the three highest values from a column in another sheet (sheet2, column B) along with their corresponding company (sheet2, column a). Ultimately, in sheet 1, I want to have a table that will display the company with those values.
This is what I am trying to achieve:
AWS ($280.9m), Google ($241.9m), Meta ($168.7m)
I was trying to use the large formula, but this does not help me with referencing the corresponding company so I’m unsure how to return both.
You can use LARGE to get your top-n, and then wrap with INDEX/MATCH and OFFSET to get the company name.
Cell E3 formula:
=LARGE($B$2:$B$7,ROW(E1))
Cell D3 formula, which returns the column to the left of the Large value:
=OFFSET(INDEX($B$2:$B$7,MATCH(LARGE($B$2:$B$7,ROW(D1)),$B$2:$B$7,0)),,-1)
or remove offset and use....
=INDEX($A$2:$A$7,MATCH(LARGE($B$2:$B$7,ROW(D1)),$B$2:$B$7,0))
Drag down your formulas as far as you would like.
The above solution is good but kinda oldschool. I would use =SORT() function instead:
=INDEX(SORT(A46:B56;2;-1);{1;2;3})
Translation to human language:
=INDEX(SORT(MyArray;ColumnToSortBy;Descending);{get first three rows}, [column])
*note: depending on your windows settings your Array row separator may differ. The easiest way to check your it is to select any range with more than one row, then get to formula bar and click F9 to see result preview.
where [column] is an optional argument, by default it takes 1st column.
I have a spreadsheet that I'm using to try and keep track of google keyword rankings, but I can't figure out how to track the last change in keyword ranking, meaning the last cell in the row MINUS the second to last cell in the row. I've included a picture on what I'm trying to accomplish. The formula would take, for example, in J3-I3 to get the last change of 4 shown in D3.
Right now I have this code:
=(LOOKUP(2,1/(3:3>0),3:3))-LOOKUP(9E+300,B3:INDEX(B3:J3,MATCH(9E+300,B3:J3)-1))
Which is fine, but I need to keep changing the cell references is. Is there any easier way to accomplish this?
You can use just INDEX(MATCH()) and refer to the full row.
=INDEX(3:3,MATCH(1E+99,3:3))-INDEX(3:3,MATCH(1E+99,3:3)-1)
If you have, say, 12 columns B="Jan" to M="Dec" with a formula in each, and you need to calculate the difference between the latest month's value and the previous month's value, the formula above does not work if any columns are blank but with formulas, or until you have a value for each of the 12 months.
If you want to calculate, say, Jun minus May when Jul to Dec are blank except for their formulas, this formula (for row 4) will do it for whatever the latest month with a numerical value is:
=INDEX(4:4,MAX(IF(ISNUMBER(B4:M4),COLUMN(B4:M4))))-OFFSET(B4,0,SUM(IF(ISNUMBER(B4:M4),1))-2,1,1)
It must be entered with Ctrl+Shift+Enter.
#ScottCraner has provided an answer with the right logic, which is to
locate the second last and last number in each row, and then perform a
simple subtraction between the two.
INDEX+MATCH is one way of solving the question, but in this case, given that all data are stored in a table, and to add the flexibility of
1) moving the table around or across worksheets;
2) entering numeric value in the same row outside of the table;
without incurring errors, I've used OFFSET+COLUMNS instead.
Please note in my example I have given a name to the table, called it Tbl_WordRk, and I have added some data (in the gray area) for testing purpose.
Basically, OFFSET works in similar logic as INDEX, with a known starting point (such as B3 in my example), it will find the value (or even a range of values) in another row or column as long as you know the relative position of the value compared to the starting point. For example, if your starting point is cell A1, the following OFFSET function will return the value in cell D8.
=OFFSET(A1,7,3) which is interpreted as 7 rows down and 3 columns to the right of cell A1
COLUMNS finds the total number of columns of a given range, which is perfect for finding a column position within a table. The following formula will return number 7 which is the total number of columns of the table in my example, but please note it is NOT the relative column position of the last column to cell B3.
=COLUMNS(Tbl_WordRk)
You need to add -1 to the above formula to find the relative column number of the last column from B3. And therefore, adding -2 will return the relative column position of the second last column from B3.
So the final formula in cell B3 in my example is
=OFFSET(B3,,(COLUMNS(Tbl_WordRk)-2))-OFFSET(B3,,(COLUMNS(Tbl_WordRk)-1))
Then you just drag it down to the last row.
Just one more advice on the conditional format of your example, I would prefer not to show a green upward arrow if there is no change in the word ranking. If you know how to edit an existing conditional formatting, here is how to set it:
Cheers :)
Here is my formula:
{=MAX(ROW($1:$120)*(Table1[results1518]=1))}
so far I have done 1518 cells manually as indicated by the results#.
I have about 2000 more cells to go. The table is on one sheet and this formula in each cell on another.
I need to find a way to increment the results# from one cell down to the next cell below it and so on down the column on the second sheet.
I would make a helper column that listed all the result# you needed to cycle through. You can either use excel's auto fill ability or just add 1 to the value of cell in the row above. For example, A3=A2+1.
Next create a second helper column that returned a text value embeding that number. B2 would look something like this ="Table1[results"&A2&"]"
Finally, you can use Excel's indriect formula looks up the value specified by the second helper column. {=MAX(ROW($1:$120)*(INDIRECT(B2)=1))}
There are probabally more effecient methoods, but without knowing more about your setup, this is what I've got.
I have the a meter data with 30 min showing time in different columns and dates in rows like:
enter image description here
Is there any way I can associate the every time values with every date in rows like this like below.
I have been trying to use index match but I am unable to figure out what can work, tried different transpose and added the values as well, didn't work.
enter image description here
Based on your pictures, your data is on Sheet8. Therefore, type the following array formula into cell B2 on Sheet1 and drag down as far as necessary: (Line breaks added for readability)
= INDEX(Sheet8!$B$2:$G$8,
MATCH(DATE(YEAR(A2),MONTH(A2),DAY(A2)),Sheet8!$A$2:$A$8,0),
MATCH(ROUND(TIME(HOUR(A2),MINUTE(A2),SECOND(A2)),5),ROUND(Sheet8!$B$1:$G$1,5),0))
Note this is an array formula, meaning you must press Ctrl+Shift+Enter when entering it, instead of just Enter.
See below, I have the same formula but all in one sheet (i.e. references to Sheet8 are removed, and I change A2 to I2 in order to show all on one sheet, but otherwise the formula is the same.)
I have set up data consolidation so the user can select from a list of dates. When the user changes the date, I want a formula (preferably a formula rather than VBA), if one exists, to look up the date in the table contained on the next page and bring through information based on this data.
I know that vlookups can look up on the table obviously with something like this:
=VLOOKUP(dateCell, table, colIndex, False)
But this seems to only bring through the first result- is there any way I can set this up so that after the first result has been brought through, I can bring through the second, third, fourth, etc. There will be multiple occurrences of each date so there will be multiple values that I want to bring through- one on each row.
See the example:
In A1:A5 values A,B,C,A,D
In B1:B5 values 3,5,6,8,9
Looking for value A in A1:A5 and get all the corresponding matches in B1:B5
Write this array formula in D1
=INDEX($B$1:$B$5;SMALL(IF($A$1:$A$5="A";ROW($A$1:$A$5);"");ROWS($D$1:D1)))
You get the first value (3), copy the formula down and you get all the others
Dont forget to Ctrl Shift Enter to enter the formula
Use AutoFilter to select the desired date, then copy all the visible rows to your destination.