Car queue formula needed

grogmi1

New Member
Joined
Sep 17, 2010
Messages
49
Hi, I have an Excel sheet which lists car numbers in one of its columns (not in sequence, they are random and need to be). These numbers are in column G2 to G180.

I have a formula running on the sheet which removes the next available car number from this list and leaves the cell where it was blank.

What I need is a formula that will look down the list in column G, ignore the blank cells and display the next available car number in cell A1.

Any help would be much appreciated!!
Thanks
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Does it have to be a formula or will a custom function (written in VBA) be acceptable?
 
Upvote 0
Your question could be interpretedin 1 of 2 ways, either

Array formula, confirm with Shift Ctrl Enter

=index(G2:G180,small(if(G2:G180<>"",row(G2:G180),1))

or regular formula

=small(G2:G180,1)
 
Last edited:
Upvote 0
Either, a VB function would be great, I'm a complete novice with VB but any help would be great thanks
 
Upvote 0
I think i know what you want now

so the numbers are all in a random order and you want to find the lowest missing number?
 
Upvote 0
Hi,

No, sorry, the numbers are in random order because each car has its own unique number and they are in a queue e.g. 1, 15, 186, 3, 7 etc etc. When car 1 gets a job it is removed from the queue so 15 would be next but there is a blank cell where 1 was.

I'm looking for a formula (or other means) that will read the list of cars and give me the number ofnext available car in cell A1.

Thanks again
 
Upvote 0
Hi,

No, sorry, the numbers are in random order because each car has its own unique number and they are in a queue e.g. 1, 15, 186, 3, 7 etc etc. When car 1 gets a job it is removed from the queue so 15 would be next but there is a blank cell where 1 was.

I'm looking for a formula (or other means) that will read the list of cars and give me the number ofnext available car in cell A1.

Thanks again

see reply #4
 
Upvote 0
Hi,

I've tried both solutions in message # 4 but the 1st one stated there were few to arguments ??? and the 2nd one would only give the answer '1' in cell A1.

Regards
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,776
Members
452,942
Latest member
VijayNewtoExcel

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