Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1036109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:38:57+00:00 2026-05-16T14:38:57+00:00

I am using an array formula (in Excel 2003) to count the number of

  • 0

I am using an array formula (in Excel 2003) to count the number of strings meeting a specific condition. I am using a column of strings instead of a table of cells to store my data because of file size limitations.

The formula is below:

{=SUM(IF((VALUE(MID(INDIRECT(CONCATENATE(D1,"test")),6,1))*VALUE(MID(INDIRECT(CONCATENATE(D1,"test")),1,1)))=VLOOKUP(D2,t.lkup,2,FALSE),1,0))}

The expression VALUE(MID(INDIRECT(CONCATENATE(D1,"test")),6,1)) looks through the cells in a named range to return a value. This value is multiplied by another value returned by the expression VALUE(MID(INDIRECT(CONCATENATE(D1,"test")),1,1)). The resulting product is then looked for in a set of numbers given by VLOOKUP(D2,t.lkup,2,FALSE), which returns a string like “{1,2,3,4}”. If the product is an element of set, then 1 is added to the sum, else 0 is added to the sum.

When I use the array formula above (with the dynamic lookup set), a value of zero is returned. If I use the following formula,

{=SUM(IF((VALUE(MID(INDIRECT(CONCATENATE(D1,"test")),6,1))*VALUE(MID(INDIRECT(CONCATENATE(D1,"test")),1,1)))={1,2,3,4},1,0))}

then the correct sum is returned. Does anyone know how to get Excel to treat the set lookup as a static set instead of a string?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:38:57+00:00Added an answer on May 16, 2026 at 2:38 pm

    An array formula performs multiple clalculations and returns either a single result or an array. All array arguments in the formula must be of equal size.

    in your first example you compare a single value of something (as the most outer function within IF is a VALUE() function) to a VLOOKUP which returns a string … that must go wrong … the fact that your string contains curly brackets does not convert it into an array.

    in your second example you compare a single value to an array containing elements {1,2,3,4}, so actually you do four comparisons, and if one of them resolves to TRUE you add 1.

    I don’t know any way to convert a comma delimited string “{1,2,3,4}” into an array {1,2,3,4} without use of VBA, but maybe you can change your tactic by converting your VALUE(…)*VALUE(…) number into a string and use the FIND() function to identify number as a substring of the condition string.

    e.g. say your MID_CONCATENATE_TIMES_BLA_BLAH results in 7, and your

    • condition string = “{1, 3, 5, 7, 9}”, a FIND(MID_BLA, CONX_STR) = TRUE
    • condition string = “{1, 2, 3, 4}”, a FIND(MID_BLA, CONDX_STR) = FALSE

    This will work as long as your results are 1 digit. With more than 1 digit you would need to include a SPACE before the number in both MID_BLA and CONDX_STR; also not too difficult, but adding even more complexity to the formulae.

    If you want to do VBA, you can use the Split() function to create a zero-based array from a seperated string

    Function StrToArray(Arg As String) As Variant
        StrToArray = Split(Arg, ",")
    End Function
    

    and surrond your VLOOKUP in (1) by StrToArray(VLOOKUP(…)), in which case you must remove the curly braces from your condition strings.

    Hope that helps – good luck

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using a pretty simple array formula in excel to crunch some datasets
I want to create a random strings using array of Dictionary. I want to
I have been attempting to insert a VLookup formula into a column using VBA.
This array formula works just fine if entered using ctrl sht enter: ={IF(ROWS(A$7:A7)>A$4,,IF(SUMPRODUCT((consumers=$A$6)*(data=A$5)*(data=A$5<>))>0,INDEX (employees,SMALL(IF(((consumers=$A$6)*(data=A$5)*(data=A$5<>)),COLUMN(Data!$B$2:$AC$2)-COLUMN
I am using Array() with each_with_index to output a array with index but I
I'm currently using Array.Copy to shift an array as such: Array.Copy(array, 0, array, 1,
I'm using Array.sample to return a random element from an array. I want to
I need to create an array of arrays. I have been using array_map(null,$a,$b,$c) to
How do I delete a specific item by using array_splice / array_slice in PHP?
Is there any speed/space/general performance gains in using array based implementation of a binary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.