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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:23:39+00:00 2026-06-15T17:23:39+00:00

i have very recently started to learn to create VBA macros in Excel, however,

  • 0

i have very recently started to learn to create VBA macros in Excel, however, I am completely stumped as to how to create a CSE array formula within my macro

I would like to define a variable as the row in which the value in column A in a sheet = value 1 and column B = value 2

within excel itself, the formula below works perfectly:
{=Match(1,(A:A=1)*(B:B=2),0)}

However, I would now like to use it within my macro along the lines of:
variable = {=Match(1,(Sheets("Right Sheet").range("A:A")=value1)*(Sheets("Right Sheet").range("B:B")=value2),0)}

Anyone able to provide any light on this?
I have played with all sorts of variants of ArrayFormula and had no success at all!
Ideally I would like my value1 and value2 numbers to be equal to variables (1 and 2) defined previously in my macro

Thanks in advance

  • 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-15T17:23:40+00:00Added an answer on June 15, 2026 at 5:23 pm

    This (eg) worked for me:

    Debug.Print Application.Evaluate("SUM(A1:A5*B1:B5)")
    

    you need to build up the formula into a string, and leave off the “=” and “{}”.

    Debug.Print Application.Evaluate("Match(1,(Sheet1!A:A=" & val1 & _
                                      ")*(Sheet1!B:B=" & val2 & "),0)")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started C very recently and I have been asked to answer
I've recently started using GNU Screen but have run into a very annoying problem.
This is a very elementary I realize, I have recently started working with asp.net
i have recently started working on C# and i am very amateur at it
I have started using django very recently . I am building a service with
I recently started to learn node.js + Express and found it very interesting. I
I have several projects with a very large over-lapping code-base. We've just recently started
I'm very used to working in WPF, but I have recently started building websites
I have recently started trying to learn MPI to code in C. I am
I have very recently started using a Bzr shared repository to manage my project.

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.