Named Range Area Number

Jeffrey Mahoney

Well-known Member
Joined
May 31, 2015
Messages
3,071
Office Version
  1. 365
Platform
  1. Windows
Is it possible to get the Area Number from the intersection of another range? In the formula below I'm trying to return the top left cell of one of the areas named in InstructionAreas. The top left cell is the name of of each section. I want that to show in the header of the report. There are 8 sections, so the formula is a test of two of the sections.

If I can get the area number from the intersection then I don't have to test all areas.

I'm using Cell("Row") to get the row where the cursor is

=IF(ISERR(INDEX(InstructionAreas,,,4) INDEX($A$1:$BB$10000,CELL("row"),))=FALSE,INDEX(InstructionAreas,1,1,4),IF(ISERR(INDEX(InstructionAreas,,,3) INDEX($A$1:$BB$10000,CELL("row"),))=FALSE,INDEX(InstructionAreas,1,1,3),"Not"))
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Not sure what you mean exactly. It's much easier to get the top left cell of a named range than that. Can you provide some sample data, the results you expect and why?
 
Upvote 0
Strangely, the XL2BB widened all the columns, they're supposed to 2.5 pixels wide.

Anyway, in this example I want to cursor through the instructions and have Cell A2 show the name of the current section. I write instructions for many workbooks and some of the sections are pages long. I want the user to know which section they are reading. I colored the named range "InstructionAreas" hot pink and put borders around it so you could see the range.

In my formula example in the previous post, I'm returning the top left cell in each of the sections. In the picture below, imagine my cursor in row 9. The intersection of row 9 and InstructionAreas is cell A9. Is there a formula trick to get the Area number of the range InstructionAreas at cell A9?
1723212129925.png


Daily Manager_2_Test.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1Instructions for the Daily Manager
2CHECKLIST SHEET
3CHECKLIST SHEET
4
5RThis helps track daily tasks by providing simple instructions, folder and file locations, and emails that need to be sent
6RThe blue column headers indicate a field you can edit
7RThe status column is used to indicate the task is completed or not
8wDouble click this column to toggle status
9RThe period should be changed after you copy the last month to a new month to start over
10RWD is based on weekdays and non-holiday days
11RTask, Title, are changeable by you
12RThe Notes column may have formulas to help with dates and other variables that need to changed
13RThe Hyperlink column allows you to open folders or files with the provided path and filename
14wNo other text should be put in these cells other than paths for folders and path/filename combos
15wDouble click the cells in this column to open the source
16RThe Email column is to add an email into outlook based on the name of the email instructions in each cell
17wThe name in the cell coincides with a set of instructions on the Email Sheet
18wDouble click a cell in the Email column to create a new email
19wRight click a cell in the Email column to edit the email instructions and choose yes
20wIt's suggested that a link to the name of the email instructions be put in this cell so that if the name is edited, the link won't break
21°Make sure to anchor the reference with $
22wThe Crit2 column helps the Workday Calendar
23wFollow the instructions below under EMAILS SHEET to learn how to edit the email instructions
24
25
26WORKDAY CALENDAR
27
28RThis shows all the daily tasks for a month
29RIf there items not finished in the past, the day turns red
30RItems get removed from the calendar as they get checked off on the Checklist
31RUse Ctrl-Up, Ctrl-Down in column B to navigate by month
32
33
34MANUAL INVOICE TRACKER
35
36RUse this to reminder yourself of tasks that need attention, especially accruals and manual invoices
37RMake sure to populate each column to make it easy on what the outcome should be
38
39
40EMAILS SHEET
41
42RThis sheet is used to provide all the details for a certain email that gets sent monthly
43RFormulas can be used to specify date ranges and other changing parameters
44RThe [CSPR] found at the end of subject lines is used by a Rule in Outlook to move them to the Central Services "CSPR Inbox" folder
45RYou can input [Emailaddress] as FROM for those emails that are Central Services oriented
46wMake sure to setup Outlook to show the From field in your outgoing emails
47RAdd [Email Address].com to the BCC field so as to not get multiple emails back
48RThere are 4 fields that help populate the Body of the email, Body A, Body 1, Body 2, and Date Formula 1
49wBecause formula cells can only contain 256 characters, Body 1 and Body 2 can be used to extend the text in the email
50wUse formulas in Body 1 and Body 2, then just concatenate those two fields into Body A
51wUse the Date Formula field for more complex data calculations and include that in Body A
52RStandard windows formatting cannot be used in emails, like bold, underline, and new lines
53wUse examples from other email configurations to see how to use HTML formatting
54wThere are simple instructions on the Email sheet
55wYou can put hard returns in the text to show what it looks like, but <br> must be used for Outlook to recognize a new line
56wSome codes must surround the text, some codes do not
57RAttachments is the name of the file. Use formulas to change dates at the end of reoccuring files
58RPath: add the server location or local path of the attachment
59
60
61WD MAP
62
63RThis is the Workday calculator for determining non-holiday weekdays
64wThis provides information to the Checklist and Calendar
65wCell E3 is where you set the first date in the series
66wIt best to cover from January 1st of the last year onward
67
68HOLIDAYS
69
70RThis calculates the holidays based on the rules provided
71wThe only thing that needs changing is the year at the top
72wThere are notes to explain how the formulas work
73
74SETUP
75
76RThere are some tables for validation and the Current Year
77wThe Current Year is used for formulas on the Email sheet
78
Instructions
Cell Formulas
RangeFormula
A2A2=section()
Lambda Functions
NameFormula
GetSectionName=LAMBDA(x,IF(ISERR(INDEX(Instructions!InstructionAreas,,,x) INDEX(Instructions!$A$1:$BB$10000,CELL("row"),))=TRUE,GetSectionName(x+1),INDEX(Instructions!InstructionAreas,1,1,x)))
 
Upvote 0
I haven't found a solution to get the area number from the intersection of two ranges, so , I created a Lambda function. It still has to compare each area of the Sections Range with the Current row, but it is faster.

Provide the Maximum Area and the starting Area
=LAMBDA(xMax,x,IF(x>xMax,"All",IF(ISERR(INDEX(Instructions!InstructionAreas,,,x) INDEX(Instructions!$A$1:$BB$10000,CELL("row"),))=TRUE,GetSectionName(xMax,x+1),INDEX(Instructions!InstructionAreas,1,1,x))))

Use it in a cell this way
=GetSectionName(8,1)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top