PDA

View Full Version : VBA help with arrays and Ifs



scottyf11
09-29-2010, 03:44 PM
I have 9 different cells with If statements that evaluate data based off a ticker symbol. These ifs pull in information from a website and assign a 0 or 1 based off the If. Now, I want to be able to enter an array as the data (instead of one ticker symbol I want to do them all at once) and then record the sum of the 0's and 1's next to the ticker symbol.

If it is helpful I can make up a mock spreadsheet to explain what I mean

Bob Phillips
09-29-2010, 03:55 PM
Try something like

=SUMPRODUCT(--(ISNUMBER(MATCH(supplied_symbols,table_symbols_values,0))))

scottyf11
09-30-2010, 11:13 AM
Sorry I don't quite understand.

I attached an example. The only difference is that "assets" and "liabilities" change once the new ticker is in the active box.

Bob Phillips
09-30-2010, 11:21 AM
I have no idea what you want having seen the data.