Hi I've always referred to these forums but I was unable to find the direct answer to my question this time so I figured it was time to create an account.
The basic idea of what I want to do is to use tag based logic to find the category that meets my specified criteria. At First I was just using INDEX/MATCH in the spread sheet, then I was using a WHILE loop with several IF loops to output what I needed but I need to do this hundred of times and neither of these methods are scalable for the work I want to do.
This is basically a layman's example for what I'm doing:
[TABLE="width: 211"]
<tbody>[TR]
[TD]Fruit[/TD]
[TD]Color[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD]New York[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]Orange[/TD]
[TD]Florida[/TD]
[/TR]
[TR]
[TD]Pumpkin[/TD]
[TD]Orange[/TD]
[TD]New York[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]Yellow[/TD]
[TD]Columbia[/TD]
[/TR]
</tbody>[/TABLE]
I want to output the fruit that is Orange and from New York. So my output should be "Pumpkin".
I know the basic syntax of .Find where I can say
Sub FindTest()
Dim c As Range
With Range("a2:c5")
Set c = .Find("New York")
End With
Range("F2").Value = c.Value
Range("F3").Value = c.Offset(0, -2).Value
End Sub
This outputs "New York" in F2 and "Apple" in F3.
Is there a way I can use this method to essentially say .Find("New York" && "Orange") in order to skip down to the row with all of the specified criteria in scalable way.
(I understand that this is a problem that would be way simpler in a database like SQL imported into Excel but basically I'm trying to figure out if I can do this at a larger scale using what I have on my home computer)
The basic idea of what I want to do is to use tag based logic to find the category that meets my specified criteria. At First I was just using INDEX/MATCH in the spread sheet, then I was using a WHILE loop with several IF loops to output what I needed but I need to do this hundred of times and neither of these methods are scalable for the work I want to do.
This is basically a layman's example for what I'm doing:
[TABLE="width: 211"]
<tbody>[TR]
[TD]Fruit[/TD]
[TD]Color[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD]New York[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]Orange[/TD]
[TD]Florida[/TD]
[/TR]
[TR]
[TD]Pumpkin[/TD]
[TD]Orange[/TD]
[TD]New York[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]Yellow[/TD]
[TD]Columbia[/TD]
[/TR]
</tbody>[/TABLE]
I want to output the fruit that is Orange and from New York. So my output should be "Pumpkin".
I know the basic syntax of .Find where I can say
Sub FindTest()
Dim c As Range
With Range("a2:c5")
Set c = .Find("New York")
End With
Range("F2").Value = c.Value
Range("F3").Value = c.Offset(0, -2).Value
End Sub
This outputs "New York" in F2 and "Apple" in F3.
Is there a way I can use this method to essentially say .Find("New York" && "Orange") in order to skip down to the row with all of the specified criteria in scalable way.
(I understand that this is a problem that would be way simpler in a database like SQL imported into Excel but basically I'm trying to figure out if I can do this at a larger scale using what I have on my home computer)