Copying data from a cell if two other cells match specific criteria

Rhys Lewis

New Member
Joined
Sep 27, 2017
Messages
3
Hi all,

I am trying to get my spreadsheet to copy data from a specific cell if two other cells match a specific criteria.

Could anyone assist?

[TABLE="width: 1016"]
<tbody>[TR]
[TD]Surname[/TD]
[TD]First Name[/TD]
[TD]Date[/TD]
[TD]First Activity[/TD]
[TD]Last Activity[/TD]
[TD]Log In[/TD]
[TD] Log Out[/TD]
[TD] Total Minutes[/TD]
[/TR]
[TR]
[TD]Addis[/TD]
[TD]Neil[/TD]
[TD]Wednesday 03-Jan[/TD]
[TD]08:41 (Access Granted)[/TD]
[TD]17:46 (Exit Granted)[/TD]
[TD="align: right"]03/01/2018 08:41[/TD]
[TD="align: right"]04/01/2018 00:00[/TD]
[TD="align: right"]09:04[/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col><col><col><col></colgroup>[/TABLE]


So I would like to copy the data from First Activity (D2) if Surname (A2) contains "Addis" & Date (C2) contains "03-Jan". I just can't figure out what formula I should be using!

Any help would be greatly appreciated.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Contains ADDS, do you mean CONTAINS or EQUALS ?
Maddsing CONTAINS adds but does not EQUAL it.
I'm assuming EQUALS.

No year supplied for that date so I guess the year is irrelevant for comparing.

Try
=IF(AND(A2="Adds",TEXT(C2,"dd-mmm")=""03-Jan"),D2,"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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