Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBA Look not working correctly in Excel

Posted on 2014-03-04
2
Medium Priority
?
248 Views
Last Modified: 2014-03-04
If you open my attached file and click the [Update] button, you'll see I'm attempting to apply a sum below the last row of each table in a worksheet.

I'm using a defined name range so the procedure knows which worksheets to select.

The code is running like expected, but it's running 3 times.  I only want it to run once.  Any idea on what changes I need to make?  Thanks for you help!
Example-Sheet.xlsm
0
Comment
Question by:KP_SoCal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 39903097
Hi,

Change

=dataDistricts!$A$2:INDEX(dataDistricts!$1:$50;MATCH("ZZZZZZZZZZZZ"; dataDistricts!$A:$A);3)

Open in new window

To

=dataDistricts!$A$2:INDEX(dataDistricts!$1:$50,MATCH("ZZZZZZZZZZZZ", dataDistricts!$A:$A),1)

Open in new window

EDIT

You are getting A2:C5 instead of A2:A5

Regards
0
 

Author Closing Comment

by:KP_SoCal
ID: 39905240
Excellent!  Thanks so much for your help!!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question