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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:18:10+00:00 2026-06-18T05:18:10+00:00

G’Day, I have a question more towards helping myself understand how Excel’s array-formulas (Control+Shift+Enter)

  • 0

G’Day,

I have a question more towards helping myself understand how Excel’s array-formulas (Control+Shift+Enter) can read each cell dynamically into the formula.

I made an simplified example to show you what I mean.

I created a small fictional farm that has some animals, listed by names and will provide the sound of what the animal makes. In the next column I made a User Defined Function called MakesSound which takes an input of what animal it is and respond the sound that animal it makes. As shown in the snapshot picture below.

enter image description here

Unfortunately, I thought an arrayformula could pick up that I have different cells listing the animals and it ends like this snapshot instead.

enter image description here

so how can I ask the arrayformula to recognise I have different cells in Column B as I know Quacks isn’t the answer for other animals. 🙂

Here is another snapshot showing the formulas next to arrayformulas for comparsion and code I used as well.

enter image description here

Public Function MakesSound(AnimalName As String) As Variant
    Select Case AnimalName
        Case Is = "Duck"
            MakesSound = "Quack!"
        Case Is = "Cow"
            MakesSound = "Moo!"
        Case Is = "Bird"
            MakesSound = "Tweet!"
        Case Is = "Sheep"
            MakesSound = "Ba-Ba-Ba!"
        Case Is = "Dog"
            MakesSound = "Woof!"
        Case Else
            MakesSound = "Eh?"
    End Select
End Function

I’m open to suggestions.

Thanks,
Peter.

  • 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-18T05:18:12+00:00Added an answer on June 18, 2026 at 5:18 am

    you need to make you array function read the data into an array, process it and create an output array.
    Then the array function nneeds to be entered in a multi-cell array formula (D3:D7) using ctrl-shift-enter.

    Public Function MakesSound(AnimalName As Range) As Variant
    Dim Ansa() As Variant
    Dim vData As Variant
    Dim j As Long
    vData = AnimalName.Value2
    ReDim Ansa(1 To UBound(vData), 1 To 1)
    For j = 1 To UBound(vData)
        Select Case vData(j, 1)
        Case Is = "Duck"
            Ansa(j, 1) = "Quack!"
        Case Is = "Cow"
            Ansa(j, 1) = "Moo!"
        Case Is = "Bird"
            Ansa(j, 1) = "Tweet!"
        Case Is = "Sheep"
            Ansa(j, 1) = "Ba-Ba-Ba!"
        Case Is = "Dog"
            Ansa(j, 1) = "Woof!"
        Case Else
            Ansa(j, 1) = "Eh?"
        End Select
    Next j
    MakesSound = Ansa
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This could be a duplicate question, but I have no idea what search terms
I have an array which has BIG numbers and small numbers in it. I
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am confused How to use looping for Json response Array in another Array.
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,

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.