Checking a column entries for specific text and reference cells not containing that text

Zsenialis

New Member
Joined
Nov 3, 2013
Messages
8
Hello!

I have a really unique excel task I couldn't figure out and hope for help here.

I have a list of room types and their attributes (total area, furniture, etc). This sheet has a format that has to be kept, however to be able import the content to a different program I need a simplyfied, plain excel sheet. In order to achieve this I created a new sheet and referenced the room names there, and using Vlookup I also matched the related attributes. The problem is that there are several unnecessary rows I can't get rid of, such as "For new types add new row", etc and merged rows containing one room type have "0"s (obviously only the first cell has data the other merged cells are empty). I tried to use an IF and OR combination: if the unnecessary data is present in a cell then reference the next row, else reference current row. The problem is that with this function combination I can only cover a finite number of skipped rows and after 3 IFs I couldn't follow the function. Also there could be even 8-10 (or more) merged rows that have to be skipped. Is there a way to create this function to be indefinite (basically to tell the program to skip the unnecessary row until it finds one with relevant data) or a solution with a different approach?

If something is not clear about the description, please let me know and I describe it further!

Thanks in advance!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Sure!

f1kd.png

As you can see, with the simple referencing the excess empty cells got referenced as well + the 2 unnecessary row. I tried a function using OR (to check for the three unnecessary cells) and multiple IF to reference the next valid cell if true and reference current cell if false. This is quite complicated (at least for me, from a certain point) but could work if there were finite number of rows to check, but a row can be inserted any time when a new furniture type is required. Some formula or different workaround would be good to automate the check and wouldn't depend on the number of rows.
 
Upvote 0
I think it would be very beneficial if you would set the data up a little more like this:


Excel 2010
ABCDE
1Room #Room NameRoom total area (m2)?Furniture requirement
21.01Dressing Room4020Locker
31.01Dressing Room404Bench
41.01Dressing Room404Shower
51.01Dressing Room402Toilet
61.01Dressing Room404Urinal
71.02Coach Room162Locker
81.02Coach Room161Table
91.02Coach Room161Bench
101.02Coach Room162Chair
Sheet1


Then your best bet will probably be a pivot table. If not, then at least your data will be setup in a way that makes it simpler to extract specific records.
 
Upvote 0
The problem is that I'm not allowed to format the 1st sheet. I tried to filter out the unnecessary rows in the 2nd sheet, but unfortunately the program doesn't recognize that the rows are hidden. It could work that I select the sorted content, copy and paste it somewhere, the content would be as needed, but this has to be fool-proof and if it can be automated (sheet 2 generates the desired plain table without any user action, after modifing the original sheet) it would be just awesome.
 
Upvote 0
First of all, why do you say those rows are extra? Don't you want to return all of the attributes from those rows?
 
Upvote 0
No, those are the part of the original sheet, but I don't need them for this comparision right now. I will need them later, but that check is gonna be manual.
 
Upvote 0
No, those are the part of the original sheet, but I don't need them for this comparision right now. I will need them later, but that check is gonna be manual.

Ok, I understood this to mean you wanted to return the Attributes as well:

In order to achieve this I created a new sheet and referenced the room names there, and using Vlookup I also matched the related attributes.

Sounds like you need an Index/Small function. I'll be on later, and can take a look at it.
 
Upvote 0
Ok, I understood this to mean you wanted to return the Attributes as well

The last two columns are not needed right now. This table is prepared to compare the Room number, Room name and Total area in this table with the information generated from a 3D model. So I still need to return the above mentioned attributes, but those are not relevant in regards with the empty cells generated by the merged cells.
 
Upvote 0
I built this on the same worksheet since you haven't provided the name of your first worksheet. If you start this off in column G of the first worksheet to test it, you should then be able to move it onto the second worksheet, and the references will update. Enter the formula in G2, and fill through I2, and then down as needed:


Excel 2010
ABCDEFGHI
1Room #Room NameRoom total area (m2)?Furniture requirementRoom #Room NameRoom total area (m2)
21.01Dressing Room4020Locker1.01Dressing Room40
34Bench1.02Coach Room16
44Shower
52Toilet
64Urinal
71.02Coach Room162Locker
81Table
91Bench
102Chair
11Add new row for additional rooms
12Insert requirements from scope documentation
Room Types
Cell Formulas
RangeFormula
G2=IF(ROWS(G$2:G2)<=COUNT($A$2:$A$12),INDEX(A$2:A$12,AGGREGATE(15,6,ROW($A$2:$A$12)-ROW($A$2)+1/--($A$2:$A$12<>""),ROWS(G$2:G2))),"")
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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