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

  • Home
  • SEARCH
  • 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 6111835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:40:34+00:00 2026-05-23T14:40:34+00:00

I found a nifty RegEx function that I’m using (see below). The function outputs

  • 0

I found a nifty RegEx function that I’m using (see below). The function outputs an array. This is fine if I only ever need the first element of the array. But I’m trying to extract authors from citation data, so I need to pull multiple items from this output.

I know about arrays in Excel sheets. So I tried ={ReFind(A3,”[^()]+”)}, selected an area and pressed ctrl+shift+enter, but it returns an error and {=ReFind(A3,”[^()]+”)} just duplicates the formula across the cells.

Is there a way to have the function output the array to multiple cells using a formula? Can I get away without having to write some more vba?

Function ReFind(FindIn, FindWhat As String, _
    Optional IgnoreCase As Boolean = False)
Dim i As Long
Dim matchCount As Integer
Dim RE As Object, allMatches As Object, aMatch As Object
Set RE = CreateObject("vbscript.regexp")
RE.Pattern = FindWhat
RE.IgnoreCase = IgnoreCase
RE.Global = True
Set allMatches = RE.Execute(FindIn)
matchCount = allMatches.Count
If matchCount >= 1 Then
    ReDim rslt(0 To allMatches.Count - 1)
    For i = 0 To allMatches.Count - 1
        rslt(i) = allMatches(i).Value
    Next i
    ReFind = rslt
Else
    ReFind = ""
End If
End Function
  • 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-23T14:40:34+00:00Added an answer on May 23, 2026 at 2:40 pm

    You need to return a 2-dimensional array that matches the range of calling cells (so that you are entering it as a multicell array formula (do not enter the { } just select the cells, enter the formula and press Control-shift-enter))
    You are currently returning a 1-dimensional array

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

Sidebar

Related Questions

I found this nifty plugin that lets me create dashboard widgets from external files.
found this regex: insert every 10 characters: $text = preg_replace(|(.{10})|u, \${1}. , $text); can
I found this open-source library that I want to use in my Java application.
I once found a nifty little library that used JNI to allow java applications
Found this script: function stopRKey(evt) { var evt = (evt) ? evt : ((event)
I found this great library for Silverlight that basically a port of libjpeg, so
I found this nifty code snippet on several sites, allowing me to analyze the
Found this great article on using jquery for image swapping: http://jquery-howto.blogspot.com/2009/05/replacing-images-at-time-intervals.html How do you
FOUND THAT CStarRating is causing this error if it is removed it gets ok.Also
Found this code that breaks out CSV fields if contains double-quotes But I don't

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.