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 8369015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:32:15+00:00 2026-06-09T13:32:15+00:00

Code-wise this seems so simple, but I still get stuck on a #VALUE. I

  • 0

Code-wise this seems so simple, but I still get stuck on a #VALUE.

I made a custom Excel function taking an array as an argument, which in itself is working fine when used just like that: =countArray({3,5}) would give 2 (for illustration, actual formula is different).

However, the actual array I’d like to use as the argument is contained in another cell (e.g. ={3,5}). As such, I’d like to call the function as =countArray(A1), using a reference to the cell containing the array I’d like to use as the argument instead of directly including the array, so I could use one and the same formula.

Is there a way to do this?

Cell formulas:
A1: ={3,5}
B1: =countArray({3,5})
B2: =countArray(A1)

Function countArray(arr()) As Integer
countArr = UBound(arr)
End Function

The formula in B1 works, the one in B2 doesn’t.
As for the contents of A1, when putting it in like this Excel only shows 3 for the cell value — because of this I assumed the cell therefore does actually contain an array.
Is this not the case then? Is it not possible for cells to contain array as their value (or have these referred to from other cells) without storing it as a delimited string and converting it to an Array?

Edit: it’s been a few years, so maybe I could comment a bit on roads I’ve tried since I posted this question. Initially I tried to go in the direction of doing operations on in-cell JSON structures, with a certain amount of success. Since then I’d also found that the recent Power Query (since Excel 2016 natively integrated) does support list structures (among others) in its ‘cells’ though, and does in fact supported related functions. I don’t use any of these as much anymore (now more interested in Spark), but hope this might help others stumbling upon this question.

  • 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-06-09T13:32:16+00:00Added an answer on June 9, 2026 at 1:32 pm

    I don’t think so you have a direct way… as you would want to Convert Cell Value to Array

    Hope it helps!!!

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

Sidebar

Related Questions

My first post here! Seems like this is the place to get wise ;)
The following code works, but I can't figure out what's going on memory-wise. Where
so i want to do something which seems pretty simple but is proving other
Strange Question i guess but i have this bit of code in my page...
Is this the right way to select an element, it seems to work but
I have two web pages which work basically the same, code-wise, but one of
Code : $('#myLink').click(function (e) { e.preventDefault(); ... if (someCondition) { ... code ... }
Code sample for my question: IList<TestDataAnimal> testDataFromDb = this.db.TestDataAnimals.Include(t => t.TestType).Include(t => t.Visit).Include(t =>
I was playing around with a simple recursive formula and noticed that the code
At the moment I am using the ajax function like so: $.ajax({ type: 'get',

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.