Search function

Graham Mackay

New Member
Joined
Apr 13, 2020
Messages
11
Office Version
  1. 2010
Platform
  1. Windows
Hi, I have a workbook that I am setting up to manage Permits. It has two active sheets. Register is the database and Index is the input function. Within Index I also have a search function which I want to search the register and display all the open Permits by searching column N and displaying any with Blank cells. I am struggling to get a macro to do this. Any help gratefully received
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Assuming your register can be filtered, you could filter for blanks, copy visible cells and paste values where you want it to be viewed.

Alternatively, instead of a macro, you could create a helper sheet to pull info from the register and organise as required. (Whenever I create a helper sheet I first pull raw data from the required sheet like index(Register!A:A,ROW(),COLUMN()). This means your helper sheet will always look at the cell you intend it to and does not cause errors when rows and columns are deleted or inserted from the data sheet.)
 
Upvote 0
Thanks for responding. Could you explain what you mean by a helper sheet?

Thanks
Graham
 
Upvote 0
You could use a formula like
=INDEX(Register!$A$2:$A$1000,AGGREGATE(15,6,(ROW(Register!$A$2:$A$1000)-ROW(Register!$A$2)+1)/((Register!$A$2:$A$1000<>"")*(Register!$N$2:$N$1000="")),ROWS(A$2:A2)))

This will return all values from col A where col N is blank.
 
Upvote 0
You could use a formula like
=INDEX(Register!$A$2:$A$1000,AGGREGATE(15,6,(ROW(Register!$A$2:$A$1000)-ROW(Register!$A$2)+1)/((Register!$A$2:$A$1000<>"")*(Register!$N$2:$N$1000="")),ROWS(A$2:A2)))

This will return all values from col A where col N is blank.
Thank you, I will try and let you know how it works.

Graham
 
Upvote 0
Hi Fluff, that worked perfectly. Just wondering a couple more things. How could I get other columns to be displayed with other info? Also where there are no entries in column A it is showing #NUM!. Thanks again. Graham
 
Upvote 0
You can hide the #NUM by wrapping the formula in an iferror. I f by other columns you mean you want to show col B,C etc then you can use
=IFERROR(INDEX(Register!A$2:A$1000,AGGREGATE(15,6,(ROW(Register!$A$2:$A$1000)-ROW(Register!$A$2)+1)/((Register!$A$2:$A$1000<>"")*(Register!$N$2:$N$1000="")),ROWS(A$2:A2))),"")

Drag down & across.
 
Upvote 0
Hi there, I tried this and it works in column A but when I drag it just populates with 12345. The formula doesn't update to the column. Should I remove the $ from it. Thanks Graham
 
Upvote 0
Not sure I understand what you mean, can you post some sample data using the XL2BB add-in.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,755
Members
448,989
Latest member
mariah3

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