Xl2bb not adding the named ranges

felixstraube

Active Member
Joined
Nov 27, 2023
Messages
492
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hi, first time user of the forum and the Xl2bb add-in. I wanted to reply to a question asked by another user an paste my bb code. Thing is I used some named ranges to make it more readable, but the named ranges are not listed at the of the code.

I'll paste my bb code here so you can see what I mean. The named ranges like "CurrentMonth", "HireDate", "TerminateDate", "LoaEndDate", "LoaStartDate" and "DaysInMonth" are not listed.
Can you tell me what im doing wrong? I made sure the "Named Ranges" was checked before copying the code.
Thanks in advance

Libro1
CDEFGHIJKLMNOPQRS
4Hire dateTerminate dateLOA start dateLOA end dateStatusene-24feb-24mar-24abr-24may-24jun-24jul-24ago-24sep-24oct-24nov-24dic-24
52022-08-082023-09-152024-09-14Active000000000,53333333111
62022-08-082024-04-15Terminated1110,500000000
72022-08-082023-09-152024-09-14LOA000000000,53333333111
Hoja1
Cell Formulas
RangeFormula
H5:S7H5=SUM(LET(days,SEQUENCE(31,,H$4,1),(MONTH(days)=CurrentMonth)*(days>=HireDate)*(days<=TerminateDate)*(NOT((days<=LoaEndDate)*(days>=LoaStartDate))))*1)/DaysInMonth
Cells with Data Validation
CellAllowCriteria
G5:G7List=StatusList
 
Welcome to the MrExcel Message Board!

I can't think any reason but checking the Named Ranges checkbox "before" clicking on the Create Mini Sheet button, unless it is something specific to the workbook or an unknown bug.

Can you share the workbook somewhere that I can download? Or I can start a conversation with you if you can't but send via email only.
Please let me know. Thanks.
 
Hi, thank you for your response.
I have uploaded the workbook here.
Thanks again.
 
@smozgur
You are probably already onto it but I think the issue is that the named ranges are not absolute ranges but relative ranges. For example, when dealing with row 5 HireDate is C5 but when dealing with row 6 HireDate is C6 etc.

So the XL2BB above shows the formula for H5 but indicates that it applies for H5:S7. Each of those 36 cells uses 6 (relative) named ranges where each of the named range combinations is different.
I'm not too sure how XL2BB could show that information.
 
@smozgur
You are probably already onto it but I think the issue is that the named ranges are not absolute ranges but relative ranges. For example, when dealing with row 5 HireDate is C5 but when dealing with row 6 HireDate is C6 etc.

So the XL2BB above shows the formula for H5 but indicates that it applies for H5:S7. Each of those 36 cells uses 6 (relative) named ranges where each of the named range combinations is different.
I'm not too sure how XL2BB could show that information.
Aha! Thanks for the explanation, Peter! I have never created or used a relative named range. In fact, I didn't know about them until today! đź’ˇ

Hi, thank you for your response.
I have uploaded the workbook here.
Thanks again.
@felixstraube: Thanks for the sample file. However, as Peter explained, XL2BB can't show that information.
 
@felixstraube
You would need to explain in detail to the OP just how to set up those named ranges, or probably simpler in this case not to use named ranges at all but revert to using the relevant cell addresses.
 
Thank you both for your replies.
I could replace the named ranges with variables in the LET function.
I learn that you could use relative named ranges like variable and include functions in them from some Microsoft examples and was oooh, wow, and used them since then for clarity. But that was way before i got Excel 365. Now this isn't needed anymore with the LET function. Will have to get used to 365.

Maybe XL2BB could show these named ranges for a specific cell, like the first one in which it is used, and specify how it is defined for that cell. Something like:

Named Ranges
NameTypeRelative toRefers ToCells
CurrentMonthRelativeH5=MONTH(Hoja1!H$4)H5:S7
DataAbsolute=Hoja1!$M$15:$P$25B1
 
I think maybe the relative named ranges could be shown similar to how formulae are shown. It is basically the same.
 

Forum statistics

Threads
1,215,603
Messages
6,125,786
Members
449,259
Latest member
rehanahmadawan

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