excel - Populate list via a bi-Condition -


I'm interested in implementing something but I'm not sure it would be possible and would like to take it on.

This is my scenario:

I will have two verification cells, which will be shown as a list, from which I will select. This is my condition that I want to remember and remember my list from a database.

I have a list of agents, which has been thrown at B13: B23 and the next two, I have columns of data that assume that my data base looks like this

  bcdx | Y Z Agent 1 1 | 1 | 0 Agent 2 0 | 1 | 0 Agent 3 0 | 1 | 1 agent 4 1 | 0 | 0  

...

I want to populate a list named agent from column B, when I verify cell 1: x and verification cell 2: 1 I choose from. It should only show an agent in column X with

  column: agent1 agent4  

or 0 ...

I read somewhere Array formula but I do not know if this is convenient and I have unfortunately not any background in the macro :( But I know C ++ is quite easy with some conditional statement like this.

Advance Thanks,

This is possible. One way to contact this is to make a sub call you Listens to the respective agents whenever the target binds with their Worksheet_Change verification CELL1 or CELL2 -> Changes Verification

Then you have 3 paramenters srcRange, validationColumn and validationValue that throws every row of srcRange and checks If the sub-station would run with a run on the rownumber, the verification column is equal to the value idationValue then this agent output and set outputrow + 1

Put this VBA in your letter if:

  Option Clear Private Sub Worksheet_Change (ByVal target as Ray H) Range dim dimension as integer set clock in the form of slow watchRange as the clock clock = Range = Me.Range ("H1, I1") 'Validation Cell' if there is no difference (target, watchrange) something If the value is not set then the verification value = Me.Range ("I1") is 0 with validation column = Me.Range ("H1") (.Value = "X") then validationColumn = 2 (.Value = "Y") then validationColumn = 3 then (.Value = "Z") then validationColumn = 4 end listAgents Me.Range ("B3: E6"), validationColumn, validationValue end then End Sub personal sub listAgents (ByRef srcRange As ray Range in the form of ByRal validationValue, byVal validationColumn as integer), dim dimension output as dim lines in the form of slow outputStart as boundary range = start.Start Me.Range ("H3") outputStart.CurrentRegion.Clear if validation Column = 0 then the MsgBox "Verification column can not be found" sub-end if left for each line in I = 0 srcRange .ows are (row.Cells (1, validationColumn) = validationValue) then outputStart (1 + i, 1) ) = Row.Cells (1, 1) I = i + 1 end then the next line End Sub  

The inspection and it worked.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -