I'm using the INDIRECT formula to extract data from specific cells in hundreds of different sheets. In column B, I've listed all of the cells I need data from, and the worksheet names are in row 6. Any suggestions on how to exract the cell number from column B?
I've tried using text strings and the CONCATENATE function, but because of the quotations, I'm getting a reference error.
=INDIRECT("'"&$C$6&"'!M8")
I want to pull data from cell M8 in every sheet, but "M8" is listed in cell B2.
Try:
=INDIRECT("'"&$C$6&"'!"&B2)
You have to use the Value in cell B2.
Related
I'm quite new to VBA and I was wondering if this might be the solution to my problem.
I have a large sheet (lets call it Sheet1) with multiple values that are normally manually filled in by the employees.
But I figured if I could populate some of the cells based on a independent cell (Order nr) this would save time and also keep the sheet dynamic.
I've currently been able to write the formulas needed to extract the data from a different sheet (Sheet2), but I don't want to populate all the cells in Sheet1 with the formulas I've created as that would disturb Sheet1. This is because not all rows have an order nr.
Is it possible to write code that would insert these formulas in the cells based on whether there is a value in the "order nr" row/column?
Example:
If there is a value in cell L1, it would insert formulas to B1, C1, F1 and G1? Each of the formulas are different as they are pulling data from different columns in sheet2. The formula I'm using is this:
=IF(ISBLANK(FILTER(SHEET2!B:B;SHEET1!C1=SHEET2!A:A));"";FILTER(SHEET2!B:B;SHEET1!C1=SHEET2!A:A))
In other words: Is there a code that would input whole formulas in to specific cells based on the cell walue of a different cell?
Br
TRL
I've searched through so many forums on here to find exactly what I'm looking for but haven't found what I needed.
Basically I have a workbook with cells that reference another workbook. Column A cells fill the date from the other workbook as does column B. I'd like for cells in column C to have an "X" if the cell in column A has actual data in it and left blank if it does not. The problem I'm running into is that Excel is putting an "X" in all of the cells in column C because it's reading that Cell A has a formula in it to pull the data from the other workbook.
Current formula: =IF(OR(ISBLANK(A5>"")),"","X")
I've tried isblank, not, etc, nothing seems to be working. Below is an example of what it's doing:
The problem
What I want
The OR() function typically works with more than one condition. You want to see if either A or B is blank, but you only test for A.
IsBlank() returns true if a cell is blank. You only need to pass it a cell, nothing else. You are using a cell compared to a blank string as the argument, which is not correct syntax.
Try this:
=IF(OR(A5="",B5=""),"","X")
On the other hand, pre-filling a column with a formula is not good data architecture. You can turn the data into an Excel Table object with Insert > Table and enter the formula for the existing rows of the table. Then the formula will automatically be applied to new rows that are added or inserted.
I thought this would be easy, but haven't figured it out on my own or found an existing answer online.
I have a worksheet set up to create charts from the contents of certain cells in a table. I'd like to be able to point one cell to a value in another worksheet and have all the related cell populate with the values using the formula in the one cell as an address reference.
For example, if I put the formula ='Source Data'!G19 in cell E3, I would like cell E4 below it to act like it has the formula ='Source Data'!G20 (one row below in the Source Data worksheet) and populate that value while cell F3 to the right would act like it had the formula ='Source Data'!H20 in it. So the new worksheet would just mirror the table of data from the Source Data worksheet for as many columns or rows as I need.
I'd tried to figure this out with offset, indirect, match and address functions, but have failed.
It is important to note that the formula needs to be able to identify the actual cell address, not just match the value from the formula because the same values show up multiple times in the Source Data worksheet.
Any help or direction is greatly appreciated.
Here's my approach:
I have a workbook with 2 spreadsheets Source Data and Results, on Source Data, I have the "Static" table that contains all my values from A1 to D12(This can be any number of cells, as long as you use an equal range in the Results sheet).
On Results, Cell A1 is reserved for the "guide" cell from Source Data, written in the following format: ''Source Data'!A1 (note the two single quotes at the begging). I chose to start at Cell B2 on the Results sheet, you can switch the formula however you like.
The desired result is achieved by using the following formula on B2:
=IF(CELL("contents",OFFSET(INDIRECT($A$1),ROW(B2)-2,COLUMN(B2)-2))<>0,CELL("contents",OFFSET(INDIRECT($A$1),ROW(B2)-2,COLUMN(B2)-2)),"")
then drag down and to the right the same number of maximum cells that exist on Source Data and the result will adjust accordingly.
I prepared a Google Sheets document with all of the information.
I'm working in Excel 2010, and my question is how do I make a cell (say on one sheet to equal a specific value placed on another sheet). I thought the following formula would do it but it doesn't work.
=IF(COUNTIF(Name,$A2)=1,VLOOKUP($A2,Name,2,FALSE),''))
If I understand your question, you simply want one cell to represent the value of another cell from another sheet? If so, the formula will look like this: =[name of sheet]![cell reference] EG: =sheet2!A1
If used in cell A1 on sheet 1, this would put the value of cell A1 from sheet2 into A1 of sheet 1.
If you modify your question so that you reference the actual sheets & cells you're interested in, I can help you with the formula.
You can easily facilitate this by writing your formula in the bar, then when you need to reference a cell on a different sheet, simply navigate to the sheet & cell to insert it's address into the formula, then carry on with your formula if necessary.
I'm having difficulty getting my vlookup formula to pull url data from another sheet (Sheet 2) and insert added information to the url based on what is in its A cell on Sheet 1.
For example,
The vlookup formula =VLOOKUP(B2,Sheet2!A:B,2,FALSE) will check to see if B2 (Sheet 1) matches with Data on Sheet 2. It will then return the data it has matched:
=HYPERLINK("http://www.dpd.co.uk/tracking/quicktrack.do?search.consignmentNumber="&Sheet1!A2&"&search.searchType=16&search.javascriptValidated=0&appmode=guest")
I then want the url link to insert whatever text is in the Sheet 1 A cell.
The formula I have used does this nicely, but I want the formula to correspond down the workbook for whatever is in cell A, not just A1 i.e. Sheet 1 A3,Sheet 1 A4....
How can I do this?
Thanks
I'm not sure if I completely understand what you are asking but allow me to share my experience with what I believe was a similar problem.
My solution was an offset/match formula. I used a formula similar to:
=OFFSET($A$1,(MATCH(B$2,'Sheet2'!$A:$B,0)+$A1),0)
And had a list of values in column A that corresponded to the distance that row was to the object cell I wanted to keep constant. Then I used autofill to fill column a down the sheet as far as I filled the formula. This way offset refrence changed on each row and I was still able to auto fill.
I hope that helps