Help with a formula if this is possible

AlanSt

New Member
Joined
Jul 8, 2015
Messages
7
Hi

I have a worksheet that I am using to plan deliveries and I would like to know if there is any way that excel can take data from cells in a table and use this to block out cells on an 'overview' grid..

my worksheet is set out as follows, an overview grid at the top of the worksheet set out as below,

cell range A2:A11 have vehicle references i.e a,b,c,d,e etc

across the 1st row starting in cell b1 I have time references , 730,0800,0830,0900 etc


at the bottom of this overview grid I record the order details,each order has a reference, o1,o2,o3 etc
each order can have multiple deliveries, so it could be a delivery at 8am, 10am,and 2pm.
these deliveries are planned on an order line using the same vehicle references and the same time set up 0730,0800,0830 etc

My question is, Can excel use the times of the deliveries and the vehicle references from the order lines to then fill in the respective cells on the overview grid with the order reference, o1,o2 etc

these deliveries can come in, in any order, o1 might be an order for vehicle A, but so might order o4.

The top table is the overview grid, the bottom table represents the order detail

0730
0800
0830
0900
0930
1000
1030
1100
1130
A
o1
o1
o2
o2
o2
B
o2
o1

<tbody>
</tbody>

ref
veh
0730
0800
0830
0900
0930
1000
1030
1100
1130
o1
A
x
x
B
x
o2
A
x
x
x
B
x

<tbody>
</tbody>

apologies if this sounds confusing,I hope it does make sense.Any help would be much appreciated.

regards
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Are you trying to drive this by VBA or formula?

Simple formula would be
Code:
=IF(C2="X",$A$2,IF(C4="X",$A$4,""))

this assume that your Order detail starts in A1 of the sheet.

In the above code "C2" represents the reference below 0730 and to the right of A in your order sheet. and "C4" represents the range below 0730 and to the right of B.

This formula would be placed below 0730 and to the right of "A" in your overview and could be pulled to the necessary range.

If it was needed to be expanded further you could continue the nested if as far as needed.
 
Last edited:
Upvote 0
Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
K​
1​
ref
veh
0730
0800
0830
0900
0930
1000
1030
1100
1130
2​
o1
A
x
x
3​
o1
B
x
4​
o2
A
x
x
x
5​
o2
B
x
6​
7​
8​
0730
0800
0830
0900
0930
1000
1030
1100
1130
9​
A
o1
o1
o2
o2
o2
10​
B
o2
o1

Note the modification to A2:A5, the range of order refs.

In B9 control+shift+enter, not just enter, copy across, and down:

=IFERROR(INDEX($A$2:$A$5,MATCH(1,IF($B$2:$B$5=$A9,IF(C$2:C$5="X",1)),0)),"")
 
Upvote 0
Brilliant, I had never given a VBA much thought, but these formulas make the worksheet behave just the way I had hoped, Thank you so much for your help.

regards
 
Upvote 0

Forum statistics

Threads
1,217,203
Messages
6,135,173
Members
449,914
Latest member
JSW

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