Complicated formula searching for an excel expert for a good time.

Stumpped

New Member
Joined
Dec 3, 2009
Messages
36
Office Version
  1. 2019
I have a formula that works for certain situations

=IF(INDEX(A573:A801,MATCH("*2B*",A572:A800,0))="[x] RENOVATION (Alterations/Repairs)", "Renovation", IF(INDEX(A574:A802,MATCH("*2B*",A572:A800,0))="[x] CONSTRUCTION", "Construction", IF(INDEX(A575:A803,MATCH("*2B*",A572:A800,0))="[x] ENERGY EFFICIENCY MORTGAGE (EEM)", "Energy Efficiency", IF(INDEX(A576:A804,MATCH("*2B*",A572:A800,0))="[x] OTHER", "Other", ""))))


CELL DATA IN CELL
A599 2B. LOAN USE
A600 [_] RENOVATION (Alterations/Repairs)
A601 [_] CONSTRUCTION
A602 [_] ENERGY EFFICIENCY MORTGAGE (EEM)
A603 [x] OTHER


When importing the data, it turns out that sometimes the cell with the "x" in the cell is either populated as [x] or [ x ], so it renders the formula above I have completely useless in determining what the final result should be because of the extra spaces. I have since modified the formula to the following:

=IF(ISNUMBER(SEARCH("x",INDEX(A573:A801,MATCH("2B",A572:A800,0)))), "Renovation", IF(ISNUMBER(SEARCH("x",INDEX(A574:A802,MATCH("2B",A572:A800,0)))), "Construction", IF(ISNUMBER(SEARCH("x",INDEX(A575:A803,MATCH("2B",A572:A800,0)))), "Energy Efficiency", IF(ISNUMBER(SEARCH("x",INDEX(A576:A804,MATCH("2B",A572:A800,0)))), "Other", ""))))

My formula has no errors or throws up no issues when entered, but it also does not return the desired result of "Other"
I need help with my formula to make it function as intended. I honestly don't know enough about all the commands to fully understand what needs correcting. I am pretty good at modifying formulas to make them work but this one I've come across one I have not been able to solve yet.

Any help would be appreciated. Thanks in advance.
 
I got it to install, but it does not seem to function. It shows up in my excel, but does not allow me to select a range of cells.
1675978112224.png
1675978139729.png
with and without cellsselected, the mini sheet and tabel only do not let me select them.
 

Attachments

  • 1675977138127.png
    1675977138127.png
    3.5 KB · Views: 3
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Maybe this will help (you may be able to use something like the MID function to get the data after the x. I didn't take the time to change the formula to match both [x] with and without the spaces. You can probably do that with the IFERROR or IFNA function as in post 3 above.
You will have to change ranges to match your data. You will also need to change the search for each category (1J, 1K, 2A..etc.)
I also put in a box showing the breakdown of the formula.

Book1
ABCDE
1
2Height # for OFFSET function
321J Building Type[_] SINGLE FAMILY RESIDENCE [x] MANUFACTURED HOME
421K Property Leasehold[ ] Yes [x] No
542A Appraisal Type
642B Loan Use[x] ENERGY EFFICIENCY MORTGAGE (EEM)
742C Building Status
8
9Formula breakdown
10MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0)12Returns row # for 1J
11ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0),1)$A$12Returns address
121J. BUILDING TYPEOFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0),1,4)),1,0,2)[_] SINGLE FAMILY RESIDENCE [x] MANUFACTURED HOMEReturns rows under 1K Building Type
13[_] SINGLE FAMILY RESIDENCE [x] MANUFACTURED HOME[_] CONDO [_] MULTI-FAMILY RESIDENCE
14[_] CONDO [_] MULTI-FAMILY RESIDENCEISNUMBER(SEARCH("[x]",OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0),1,4)),1,0,2)))TRUEReturns TRUE for row with [x]
152B Loan UseFALSE
16[_] RENOVATION (Alterations/Repairs)
17[_] CONSTRUCTION
18[x] ENERGY EFFICIENCY MORTGAGE (EEM)
19[ ] OTHER
201K Property Leasehold
21[ ] Yes [x] No
22
23
Sheet2
Cell Formulas
RangeFormula
C3C3=INDEX(OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0),1,4)),1,0,$A3),MATCH(TRUE,ISNUMBER(SEARCH("[x]",OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0),1,4)),1,0,$A3))),0))
C4C4=INDEX(OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1K",A2:A26)),0),1,4)),1,0,$A4),MATCH(TRUE,ISNUMBER(SEARCH("[x]",OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1K",A2:A26)),0),1,4)),1,0,$A4))),0))
C6C6=INDEX(OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("2B",A1:A25)),0),1,4)),1,0,$A6),MATCH(TRUE,ISNUMBER(SEARCH("[x]",OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("2B",A1:A25)),0),1,4)),1,0,$A6))),0))
D10D10=MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0)
D11D11=ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0),1)
D12:D13D12=OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0),1,4)),1,0,2)
D14:D15D14=ISNUMBER(SEARCH("[x]",OFFSET(INDIRECT(ADDRESS(MATCH(TRUE,ISNUMBER(SEARCH("1J",A1:A25)),0),1,4)),1,0,2)))
Dynamic array formulas.
 
Upvote 0
Solution
I got it to install, but it does not seem to function. It shows up in my excel, but does not allow me to select a range of cells.
Look at the link that I gave you in post #10
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

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