INDIRECT for a whole column on another sheet - excel

Ive searched around for how to use the indirect command for a whole column (on another sheet) but with limited responses
Ive seen it has to be something like this
=SUMIF(Site!$A:$A,D11,indirect("Site!$F",Row($F))
The reason I want to use indirect is because the cells on that sheet are always changing (and columns are being delted / recreated automatically) - But the data I need will always end up in the same cell (But the formula automatically readjusts when you delete a col etc)
Any help would be awesome

You mean you just always want to sum column F in your example? You can just use:
=SUMIF(Site!$A:$A,D11,INDIRECT("Site!$F:$F")
If that's so.

Related

How do I prevent a column reference to an external Excel sheet from automatically incrementing?

I am trying to reference a column in an external Excel document in my formula, and then expanding said formula to the right to auto-fill the remaining cells. I have some values in the formula that I want to not auto-increment, which have been locked using absolute references ($), and others that should increment. But when it comes to the references to the external worksheet columns, those increment even though it makes no sense for them to do so.
Consider this formula as an example, with A1 through A* being a series of dates:
=COUNTIFS(external_sheet[date]; ">="&A1; external_sheet[status]; "ACTIVE";)
If I were to expand this formula to the right, it will increment [date] and [status] to the next column in the sheet. I do not want this behavior, but as far as I can tell there is no way to lock down these values as you can with absolute references. I tried adding a $ symbol before the external sheet reference, but that just breaks the formula.
An option would be to do external_worksheet!$A:$A instead, but for my use case it would make more sense to use references to named columns, as the order of columns may change between data files.
Figured it out after some more Googling (and learning that this is called a "structured reference"). Apparently, the syntax is this:
=COUNTIFS(external_sheet[[date]:[date]]; ">="&A1)
This will make sure that date does not increment to the next column name when filling to the right.
Thanks, I hate it.

Excel sum range & next set of range numbers

Trying to do something which I think is quite easy but I cant figure it out.
I have a row of about 1000 items. I want to sum for items (A1:H1) and then (I1:Q1) and so on until I get to the end. When I try to do (A1:H1) and drag the formula button across it then gives me (B1:I1). Im trying to avoid this.
Thanks!
Slightly convoluted but the below should work for you. You will need to add in the names of your sheet instead of "Sheet1", it essentially works off of the column reference of the cell the formula is placed into, I had it starting in column A.
=SUM(INDIRECT("'Sheet1'!"&ADDRESS(1,(((COLUMN()-1)*8)+1))&":"&ADDRESS(1,(COLUMN()*8),1,1)))

Excel formula to prevent duplicate name entries

I am creating a work chart for a project with excel table. However with so many people to manage I have ran into an issue of often putting same person twice on different columns of the same row (he/she can't work on two places at same time!)
So, I am looking for help with a formula that notices if the same name appears twice on a row but does not count multiple blank cells as duplicates. My understanding of excel is very basic and so far I have managed to get this far
=COUNTIF(A6:W6;A6:W6)=1
which returns to me with false, which I assume is because of the blank, unfilled cells still within the table being counted as duplicates.
Help would be appreciated, thanks.
You can't have a range as the second argument of a Countif. The range you pass into the formula will resolve to just the first value. Use the Evaluate Formula tool to see what I mean.
If you want to determine if ANY name in the range A1:W1 appears more than once (and exclude blanks), you will need a recursive function. That can only be done with VBA, not with a formula.
You could use a Countif in a conditional format to highlight duplicate names in a row. That's a piece of cake. Pipe up if you want to do that.

Easy One - reference to non-sequential cells

I'm sure this has been asked before, but I couldn't figure out the right search terms to get the answer I was seeking, so apologies...
I have one worksheet with regular but non-sequential data (i.e. values in A1, A11, A21...)
In another sheet, I want to be able to put in a formula to get the values from those cells, and have it be easily scalable so I can drag the formula down and continue to get every nth cell from Sheet1. It looks like OFFSET will work, but it's not that elegant. VBA seems like overkill...Is there a better way?
Thanks!
Either Offset like you said, or something like this would be on the other sheet in Row 1 and copied down (assuming the first sheet is called 'sheet1', or change to the actual name:
=INDIRECT(ADDRESS(ROW()*10-9,1,,,"sheet1"))
Offset would be even clearer:
=OFFSET(Sheet1!A1,((ROW())-1)*10-ROW()+1,0)

trying to expand vlookup to other cells without automatically changing values

I am setting up a vlookup to pull product prices from another sheet within the workbook. The code works for the cell but when i try to expand or copy and past the code into the next row it automatically changes the data table_array value.
=VLOOKUP(B5,Prices!1:65536,3)
Within the code i want the first value, B5 to scale with the row it is in, however the second value needs to remain the same. How do i go about doing this? Also is there a way that i can get the cell to remain blank instead of displaying N/A if there isnt a valid part number?
Thanks for your help!
=VLOOKUP(B5,Prices!$1:$65536,3)
The $ lock the range.
For example.
$A1 will lock the column to A when the formulas is copied other
locations.
A$1 will lock the row
$A$1 will lock both the column and the row.
I can't comment because I do not have enough rep but this will fix user3716271 's formula:
=IF(ISERROR(VLOOKUP(B5,Prices!$1:$65536,3)),"", VLOOKUP(B5,Prices!$1:$65536,3))
The following formula should solve both problems as well, a little more compact and would use one less VLOOKUP():
=IFERROR(VLOOKUP(B5,Prices!$1:$65536,3), "")
As guitarthrower had said, the $ before the number is used to lock the range.
For the second part, an IF formula will work fine:
=IF(ISERROR(VLOOKUP(B5,Prices!1:65536,3)),"",VLOOKUP(B5,Prices!1:65536,3)),"")
And if I understand correctly the first part have you tried set an absolute value? Something like:
=IF(ISERROR(VLOOKUP(B$5,Prices!1:65536,3)),"",VLOOKUP(B5,Prices!1:65536,3)),"")

Resources