NUMBER IF MATCH List with no Blanks, NEED HELP!

wwest

New Member
Joined
Jul 16, 2016
Messages
4
Help!!! I need a formula for this case:
In sheet 1, there are two columns A and B. If a number is inserted in column B, the matching projectno. in column A needs to be transferred to sheet 2. Blank cells has to be skipped so there will be a list of projectno. which will activate if the number is filled in, in sheet 1.
sheet1sheet2
projectno.numberprojectno.
E188888E1
E2E4
E3N4
E444444O2
E5
N1
N2
N3
N477777
N5
O1
O233333
O3
O4
O5

<tbody>
</tbody>
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I know there are other ways to do this, but this method is fairly simple and easy to understand. It uses a helper column (which you can hide)...
A​
B​
C​
D​
1​
sheet1sheet2
2​
3​
projectno.numberprojectno.
4​
E188888
1​
E1
5​
E2
1​
E4
6​
E3
1​
N4
7​
E444444
2​
O2
8​
E5
2​
9​
2​
10​
N1
2​
11​
N2
2​
12​
N3
2​
13​
N477777
3​
14​
N5
3​
15​
3​
16​
O1
3​
17​
O233333
4​
C4=COUNTIF($B$4:B4,"<>")
copied down

Then to pull your data...
D4=IFERROR(INDEX(A:A,MATCH(ROW(A1),C:C,0)),"")
copied down
 
Upvote 0
Method without helper column.
This is an array formula and must be entered with CTRL-SHIFT-ENTER.

Excel Workbook
A
1projectno.
2E1
3E4
4N4
5O2
6
Sheet2


Excel Workbook
AB
1projectno.number
2E188888
3E2
4E3
5E444444
6E5
7
8N1
9N2
10N3
11N477777
12N5
13
14O1
15O233333
16O3
17O4
18O5
Sheet1
 
Upvote 0
Thank you very much, Ford!

Is there also a formula without a helper column? It's for a timesheet I am developing which will be used by a lot of workers. The basic data field and monthly sheets are ready and I only need to fit in this last formula.
Thanks!
 
Upvote 0
It did work! thank you so much.

I have one other question. Sometimes the projectnumber in column B contains some text, like 777777-ERC-9999. The fomula doesn't work if there are letters in de formula. Is there a formula which covers numbers and also letters?

You already helped me a lot further......I have been searching for days! THANKS
 
Upvote 0
While that ARRAY formula will indeed eliminate the need for the helper column, if you have a LOT of data to go through, it could tend to slow your file down
 
Upvote 0
It did work! thank you so much.

I have one other question. Sometimes the projectnumber in column B contains some text, like 777777-ERC-9999. The fomula doesn't work if there are letters in de formula. Is there a formula which covers numbers and also letters?

You already helped me a lot further......I have been searching for days! THANKS
try this ARRAY formula...
A​
B​
C​
1​
sheet1
2​
3​
projectno.number
4​
E188888E1
5​
E2E4
6​
E3N4
7​
E444444O2
8​
E5
9​
10​
N1
11​
N2
12​
N3
13​
N477777
14​
N5
15​
16​
O1
17​
O233333
18​
O3
19​
O4
20​
O5
C4=IFERROR(INDEX(A:A,SMALL(IF($B$4:$B$20<>"",ROW($B$4:$B$20)),ROWS($A$1:A1))),"")
CSE entered, then copied down
 
Upvote 0
@wwest

I'd prefer the set up AhoyNC suggests. He used IFERROR for control. If you need more speed, this slow function can be replaced...

Since it's known where the data is located, define the following names in Formulas | Name Manager...

Projects as referring to Sheet1!$A$2:$A$18;

Numbers as referring to Sheet1!$B$2:$B$18; and very importantly:

Ivec as referring to:

=ROW(Peojects)-ROW(INDEX(Projects,1,1))+1

Sheet2

In A1 of Sheet2 just enter:

=COUNT(Sheet1!B2:B18)

In A2 of Sheet2 just enter: projectno.

In A3 of Sheet2 control+shift+enter, not just enter, and copy down:

=IF(ROWS($A$3:A3)>$A$1,"",INDEX(Projects,SMALL(IF(ISNUMBER(Numbers),Ivec),ROWS($A$3:A2))))

Note 1. Using rather ISNUMBER than anything else is appropriate here for we have to do with numbers and nothing else.

Note 2. The ROWS bit in front is faster than IFERROR.

Note 3. Ivec is a generalizable concept and probably computed just once in the name once, therefore fast.
 
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,759
Members
449,048
Latest member
excelknuckles

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