Consulting

Results 1 to 4 of 4

Thread: VBA help with arrays and Ifs

  1. #1

    VBA help with arrays and Ifs

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try something like

    =SUMPRODUCT(--(ISNUMBER(MATCH(supplied_symbols,table_symbols_values,0))))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    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.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I have no idea what you want having seen the data.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •