Can you do an IF(AND array

Goliath1234

New Member
Joined
Nov 7, 2018
Messages
3
Hi,

I am trying to create a calendar from a list of activities where if the cell is between a certain time frame it will output the name of the activity during that time frame. The name of cells are within three cells A5, B5 and C5 which the text will be combined into the one cell. However i currently have this set to one specific row 5 (1 activity). I would like this to pick up an array of rows (multiple activities) but the AND function wont let me do a formula with an array. See below formula.

=IF(AND(K25>$D$5,K25<$F$5),$A$5 &" " & $B$5 & " " &$C$5," ")

i have attempted the below but get a #VALUE ! error
=IF(AND(K25>$D5:$D8,K25<$F5:$F8),$A5:$A8 &" " & $B5:$B8 & " " &$C5:$C8," ")

Is there a way around this?

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi,

Most probably you will need an Array Formula ...

Could you describe your worksheet ... and give an example of your expected result ...
 
Upvote 0
Hi,

Most probably you will need an Array Formula ...

Could you describe your worksheet ... and give an example of your expected result ...


Hi James,

Data from columns A-G are shown in table below;

ABCDEFG
Activity

<tbody>
</tbody>
Supplier

<tbody>
</tbody>
Description

<tbody>
</tbody>
Time in

<tbody>
</tbody>
Date In

<tbody>
</tbody>
Time Out

<tbody>
</tbody>
Date out

<tbody>
</tbody>
Flight

<tbody>
</tbody>
Qatar Airways

<tbody>
</tbody>
Sydney to Doha

<tbody>
</tbody>
21:45:00

<tbody>
</tbody>
18/02/2019

<tbody>
</tbody>
05:20:00

<tbody>
</tbody>
19/02/2019

<tbody>
</tbody>

<tbody>
</tbody>

The aim in these columns is to produce a calendar style format next to it. Text from A,B,C get put into one box when the time is between the selected times in Column D & F. See below.

18 February 2019
20:00:00
21:00:00
22:00:00Flight Qatar Airways Sydney to Doha

<colgroup><col><col></colgroup><tbody>
</tbody>
23:00:00Flight Qatar Airways Sydney to Doha
00:00:00Flight Qatar Airways Sydney to Doha

<colgroup><col><col></colgroup><tbody>
</tbody>

The problem with this is i can't get an array formuyla to work with a selection of columns.
 
Upvote 0
Hi,

In order to make your life easier, my recommendation would be :

1. To use Sheet 1 for all your Data

2. To build your Calendar in Sheet 2

3. To use a macro to automate and speed up your process

Hope this will help
 
Upvote 0

Forum statistics

Threads
1,215,724
Messages
6,126,493
Members
449,316
Latest member
sravya

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