In Excel, I need to RANDBETWEEN and display cell information with named entries that are on every other row. How can I do this? This is working =INDEX($A$1:$A$23,RANDBETWEEN(0,ROWS($A$1:$A$23)),0) but I need every other row please.
Related
I have a table in excel which is constantly having new rows added. I then have another sheet (lets call it results) which is referencing this table, and counting the values in each column.
Every time I add a new record/row to my table, the results sheet throws a bunch of errors in every cell that references the column. Because I'm using a fixed range in the formula to count the column, e.g. =SUM(A1:A10), I then need to manually click each cell in results and select 'include adjacent cells' to get the count to reflect the new data. I have loads of cells in this table and I'm adding data daily so this is a very long winded way of doing things.
I'm looking for a way that I can automatically update these cells, either by using a macro, or adjusting the formula so that it will automatically increase the range of the SUM when I add new data.
The best solution I've had so far was to simply define the range to include the row below my last piece of data (i.e. if A10 is my last record, the formula would be =SUM(A1:A11)). This works, and auto increments the formula when a new cell is added. However, if I delete the record from the table for any reason, the formula reverts to only including the range containing data.
In other words, this solution works, but only until I have to delete a record. Is there any better solution that can detect which rows are populated, and auto include them in the formula?
=SUMPRODUCT(INDEX('Sheet1!'A:A,1):INDEX('Sheet1!'A:A,LOOKUP(2,1/('Sheet1!'A:A<>""),ROW('Sheet1!'A:A))))
Using INDEX and ROW reference, deleting cells won't result in broken cell references. LOOKUP is used to calculate the last non-empty cell in column A. This will auto update.
Using SUMPRODUCT instead of SUM makes it an array formula and does not require older Excel versions to enter the formula with ctrl+shift+enter (because of the LOOKUP function)
In Office 365 you could use: =SUM(FILTER('Sheet1!'A:A,'Sheet1!'A:A<>""))
I am using Office 365.
I have a sheet with a column of relevant values. In a separate sheet of the same workbook, I want to display EVERY row number of cells in a column that are not blank.
The FIRST formula DID work, but it is NOT working anymore. This is where I need help. Is something off here? I don't think I changed anything, but it seemed to just stop working last week, after working well for a couple months.
=IFERROR(SMALL(INDEX(('Patient Tracker'!$A$4:$A$848="")*10^10+ROW('Patient Tracker'!$A$4:$A$848),0),ROW('Patient Tracker'!A1)),"")
The " *10^10+ROW " is to later be able to copy down this formula and draw from this new column of indexed data by using this formula:
=IF(A2<500,INDEX('Patient Tracker'!$A$4:$D$848,A2-3,1),"")
So, if <500, it returns a blank.
THIS formula successfully returns the value of cells that are not blank from the same sheet. This is good, but I want the ROW number of the cell where this data comes from, AND I don't want the blank cells to be copied over to the new sheet, which this formula does.
=IFERROR(INDEX('Patient Tracker'!$A$4:$A$848, SMALL(IF(ISBLANK('Patient Tracker'!$A$4:$A$848), "", ROW('Patient Tracker'!$A$4:$A$848)-MIN(ROW('Patient Tracker'!$A$4:$A$848))+1), ROW(A1))),"")
Please be pateint and specific with me. I barely understand the formulas I am using.
I want to count the blank columns in a row, but only for today's date. I figured using COUNTBLANK was the best option but I cant see how to increment the rows.
I uploaded a snippet of the summary sheet that we're using. Within the workbook there's about 20 sheets that need daily updating, and I wanted to have a cell that lets the user know if they omitted entering data into a particular cell.
The cells on the summary sheet aren't actually blank, they all have VLOOKUP formulas in them.
I have two excel spreadsheets. The first column of each is a column of serial numbers. Basically I need to take the first sheet, match the serial numbers from the other sheet (they are out of order and some are missing) and the fill in the unique data from the fist sheet into the appropriate columns of the second sheet. Does that make sense? I'm an excel noob, but I'm trying to learn! Thanks!
You could use VLOOKUP in order to do that. In cell B2 on your second sheet, use the formula
=VLOOKUP($A2,Sheet1!A:B,2,FALSE)
From this, just add the column range as the second input between the serial number and the column you want to look up. Then repeat for each column.
This picture shows the setup in the first sheet:
All of the data is hard coded.
This picture shows the setup in the second sheet.
As #timthebomb suggests, the formula in the second column (second row) is the following Vlookup:
=VLOOKUP(A2,Sheet1!$A$2:$B$9,2,FALSE)
I have three columns for each month. I need to average the value in the third column of each month for the last three entries. Can I write a formula that will select the last three entries in the designated range and calculate the average.? And to do this for multiple rows where the data may not be in the same columns?
My level of skill in using Excel is very limited, but I am trying to learn, I would very much appreciate any help that may be forthcoming.
You can use the AVERAGE() function in a cell on the same row. The arguments for the function will be the cells you wish to average.
Can be a series of cells (A1,B1,C1....) or a range (A1:C1). If you use cells from all over the spreadsheet. The copy function uses the relative position by default.
Once you have the function working in a particular row, you may copy that formula down to the other rows in the spreadsheet. Excel will automatically change the formula to include the corresponding cells from the same row the formula is being copied to.
For additional info on this function, visit:
http://office.microsoft.com/en-ca/excel-help/average-function-HP010062482.aspx