Cell value dependant drop downs (simple INDIRECT(CellValue) no good) - excel

I have searched web, but can not find a way to do cell value dependant drop down, when more than one DD depends on same cell value.
Here is simplified version of what I am trying to do:
enter image description here
The first dependant drop down in Cell C4 uses =INDIRECT(C2) formula in Data Validation. And works perfect - When C2 = "_A", C4 drop down is named range _A.
What formula I need to use in C5 Data Validation to still give me drop down based on same Cell C2 value, but this time from other Named Ranges?
Hope my question makes sense. Please help!

What you need are different string to be inputted in each INDIRECT statement.
This can be done with a VLOOKUP
First you will need a table matching each possible value in C2 to named ranges for each cell that will use data validation.
I don't know what your setup is, so I assumed C2 can only have one of two values: _A and _B -- just add rows for more values
In C4, use the following formula for Data validation:
=INDIRECT(VLOOKUP(C2,O2:P3,2))
And in C5:
=INDIRECT(VLOOKUP(C2,O2:Q3,3))
You can have the lookup table wherever you want, just change the references accordingly, also put in whatever named ranges you have in the correct spot in the lookup table

Related

Dynamic data validation lists populated from another cell

I am trying to achieve two things which I presume are possible but I'm unsure of where to start.
What I am hoping to achieve is to populate the list (shown in cell C4) with the data entered in cell A3. What I don't know is how to make the A3 string breakdown based on the comma delimiter so that it is not one long string, but rather results in a list at C4, as displayed in the screenshot.
Note: I have hardcoded the list shown in the screenshot as I wanted to show what I need to achieve. If I reference A3 directly (=$A$3), my list only has one item - 'Yes, No, I don't know', opposed to the list displayed in the screenshot.
Then, if this is possible, instead of hard coding A3 as the reference, I want to read the value in B4. This would allow me to change the value of B4 to point at any other cell, such as A6.
I believe both these things are likely possible but Googling has not helped as it appears I'm searching for the wrong keywords.
Instead of having all options in one cell, why don't you just make a list across different columns and then enter in the reference cell the letter of the column. Then in your validation, use indirect(cell ref & "1:" & cell ref & "Max row num").
Or better yet, name the ranges, then simply list the name of the range in the reference cell and use indirect(cell ref) to dynamically change drop down options. E.g your range would be named "fruit", in b4 you would enter "fruit".
May be you can try to separate them in cell A3
=SUBSTITUTE(LEFT($A$2,FIND(",",$A$2,1)),",","")
and try to paste as will in Cell A4
=MID(A2,FIND("Yes",$A$2,2),3)
so as will separate the last word to cell A5
=RIGHT(A2,LEN(A2)-FIND("Yes, ",$A$2)-4)
And your Source in your data validation would be
=$A$2:$A$4

How to filter and add together one column using the information of another column, which I need to find using a cell

Basically, I want to filter, and then add together, one column('Essay Sentences'!H6:H1400) using the information of another column, which I need to find using a cell(A2).
For example, I have the column 0011c ‘Essay Sentences’!H6:H1400 and I want to add together only the 0011c’s that also have at least one 0012a. But I only get the “0012a” column from searching for it with cell A2.
A2 could be anything from the header 'Essay Sentences'!F4:AZ4, so I need the formula to look for any column under these headers.
Also, I need to use the FILTER() and SUM() functions.
Here's what I got so far:
=SUM(FILTER('Essay Sentences’!H6:H1400, INDEX('Essay Sentences'!F4:AZ1400, 0, MATCH(A2, 'Essay Sentences'!F4:AZ4, 0)) > 0))
Link to Source Data1
Link to Source Data2
A mock up example as below:
Please see below solution using SUMPRODUCT based on your mock-up example.
The following formula is in Cell C10 in my solution. You cannot drag it across board as it has been hard-coded to specific named ranges. Use INDIRECT for more flexibility if needed.
=SUMPRODUCT(FRUITS*(SNACKS>0)) or =SUMPRODUCT(INDIRECT($A10)*(INDIRECT(B$9)>0))
The three formulas are essentially the same depends on if you prefer to use Named Ranges (eg. FRUIT stands for cell B2:B5) or actual ranges (eg. B2:B5) in the formula.
Using INDIRECT enables you to drag the formula across board but the trade off is that it will slow down the calculation. If you are only comparing one column with another, just use the Name or the actual range in the formula.

Auto Copy and Paste Cell Values not Formula to another Cell

I also need to get your help for the same issue. I need to copy the cell values and not the formulas automatically to the other Cell, "automatically" meaning, I don't need to click, use mouse, or any other means to do that, like once theres a value on that specific cell (which is derived from a formula), the value will automatically be copied and pasted in the other cell (without any intervention from my part) (Only the value is copied not the formula)
Note:
The cell should contain only the copied value and not the formula.
Scenario:
A1 Cell : has 250 value
B1 Cell : has a vlookup formula to search for the value of A1 cell (I need to use VLOOKUP as there's a lot of items in the list, and it is "Dynamic", the reason I cannot just use formula "=A1" to get the value directly)
C1 Cell : Needs to copy and paste only the plain value from B1 cell which is 250, not including the vlookup formula, it should be automatically copied without any intervention (Cannot use VBA code / Macro as it will be run in excel online)
Thanks!!
Just use abasic Excel formula.
Example:
The source data is in cell A1.
You want to copy the same value to cell B1.
In cell B1 write:
=A1
That is all.
Additionally, you need to configure correctly the strategy for calculating the formulas:
I managed to find a solution, sharing as might help someone in the future, just needed to use =value(A1), instead of just "=A1", when I did this, the chart can read the values as it is and not the formula behind it. Found another work around as well, by using the formula =A1+0, for some reason this works too. –
=value(A1) works perfectly , If that formula contains a % figure , simple We can multiply by 100 to get the correct value.

Return Match Values and also count this value for how many repeated in a range of cell in Excel

I am straggling with some formula that I have a spreadsheet that contains two range of cells. What I want to do is,
I would like to create a search Box that will search a value from Range A and if found return range B value and also will count of range B value is repeated.
Below image is for what I mean
I used INDEX, MATCH and also IF Functions :( but not really get what I wanted.
I am poor in formula, so it would be great if someone can figure out what kind of functions I should use for this.
For information, it can be achieved through formula as below.
E3 houses the value being searched for e.g. "A"
In cell F3 insert following array formula which needs to be committed by hitting CTRL+SHIFT+ENTER simultaneously.
=IFERROR(INDEX($B$1:$B$1000,SMALL(IF(IFERROR(MATCH($E$3&$B$1:$B$1000,$A$1:$A$1000&$B$1:$B$1000,0),0)=ROW($B$1:$B$1000),ROW($B$1:$B$1000)),ROWS($A$1:A1))),"")
Copy down as much as you need.
You need to adjust 1000 to suit your data. It should match last row.
In cell G3 you can use following formula.
=IF(F3="","",COUNTIFS(A:A,$E$3,B:B,F3))
Copy down as much as you need.

Pull from List Excel

I have a set list that is frequently changed. Example shown below:
A1 AEZS
A2 AEMD
A3 EARS
A4 BCT
A5 BSTG
A6 CHFS
A7 BPMX
A8 ABCD
A9 ZERNA
A10 APPL
I want to extract from this list to pull the words that start with the letter "A", and make it into another list. From my research, I'm aware that using the following function.
Below is the end result I would like to do (C column is arbitrary):
C1 AEZS
C2 AEMD
C3 ABCD
C4 APPL
How can I do this?
I'm aware that using the formula =IF(LEFT("A",1)....etc is probably a good start. But I am new to Excel, and I am not too familiar to working with it. Additionally, I would like to be able to keep the cells in their each row (as in not all into one cell)
You can use an array formula (entered with CTRL+SHIFT+ENTER).
If your info (AEZS, AEMD, etc.) is in column A, starting row 1, you can put this in say B1 and drag down:
=INDEX($A$1:$A$10,SMALL(IF(LEFT($A$1:$A$10,1)="A",ROW($A$1:$A$10)-ROW(A$1)+1),ROWS(A$1:A1)))
Then, to hide errors, just wrap IFERROR([above formula],"") around it.
You can avoid using Array formulas by using the AGGREGATE function. It might also be handy to put the "starting letter" in a cell so it can be changed. For example, with your data in myRange in column A and the starting letters in the first row,
B2: =IFERROR(INDEX(myRange,AGGREGATE(15,6,1/1/(LEFT(myRange)= B$1)*ROW(myRange),ROWS($1:1))),"")
Select B2 and fill across as far as needed (eg to Bn)
Then select B2:Bn and fill down as far as needed.
To understand how this is working, I suggest you use Excel's built-in HELP feature, and also the formula evaluator tool.
And, of course, if this does not need to be dynamic, you can always use a simple or advanced filter. Again, these are well explained in HELP.
Advance Filter offers something of the capability, though is not dynamic:
Add a label to ColumnA and a criterion in A2:
="=A*"
Then DATA > Sort & Filter, Advanced and select Copy to another location, select ColumnA for List range:, A1:A2 for Criteria range: and Copy to: wherever suits.
Advance Filter remembers those settings (except, strangely, Copy to another location) so if the contents of ColumnA change it is only a few clicks to call up Advanced Filter again, select Copy ... and OK.

Resources