Need help with complicated formula

zjamespryor

New Member
Joined
Aug 7, 2014
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hello, I hope I have came to the right place. I consider myself proficient with excel and I have some experience with vba code but I am having some trouble writing a formula for a project I am doing for my internship. I can't go into specifics because of company policies but on one sheet I have a list of dates in a row. On a second sheet used as a "data-dump" I have two columns, one for dates, and one for two-letter codes we use to label things. On the second sheet, there can be multiple entries of the same day and same codes. So, can a formula, or vba code, be written so that if for instance they have some date and "XX" on the second sheet the "XX" code will appear underneath the specific date on the first date.

I hope I am making sense with this but I would greatly appreciate any help. My idea originally was to use an extensive IF and MATCH function but I cannot making anything work.

Thank you in advance if you are able help.
 
I would use countifs. Whether you incorporate it into a formula
=if(countifs(Range,criteria, range1, criteria1)>0, "XX" value,"")
or you use it in VBA.
if Application.worksheetfunction.countifs(range, critera, range1, criteria1) > 0 then
range = criteria1
else
end if

or something like that. It's hard to advise specifically without some test data to view, but the above should work.
 
Upvote 0
@zjamespryor

You can create a fake sample, but representative of your lay-out, and post it here along with the outcome you want to see.
 
Upvote 0

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