Mark combined if.......

mark692

Active Member
Joined
Feb 27, 2015
Messages
321
Office Version
  1. 2016
Platform
  1. Windows
DateGroup CodeRemarks
06/02/20171combined
01/01/20181combined
03/02/20181combined
01/05/20172nope
01/06/20172nope
01/08/20183combined
09/09/20173combined

<tbody>
</tbody>


hi guys is this possible,

if the year of dates within the same group is different i want to put "combined" in remarks column, if not put "nope"?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi, here is one option that you can try:


Excel 2013/2016
ABC
1DateGroup CodeRemarks
206/02/20171Combined
301/01/20181Combined
403/02/20181Combined
501/05/20172Nope
601/06/20172Nope
701/08/20183Combined
809/09/20173Combined
Sheet1
Cell Formulas
RangeFormula
C2=IF(COUNTIFS($A$2:$A$8,">="&DATE(YEAR(A2),1,1),$A$2:$A$8,"<="&DATE(YEAR(A2),12,31),$B$2:$B$8,B2)=COUNTIFS($B$2:$B$8,B2),"Nope","Combined")
 
Upvote 0
thanks sir your formula work but the problem occur when table is like this


Excel 2013/2016
ABC
1dategroup coderemarks
201/01/20171nope
301/02/20171nope
41nope
502/02/20172combined
602/18/20182combined
72combined

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1



a cell on column A has no data but within group code
 
Last edited:
Upvote 0
problem occur when table is like this

Hi, I guess you you forgot to tell us that was a possibility, here is one option - pay attention to the array formula notes.


Excel 2013/2016
ABC
1DateGroup CodeRemarks
201/01/20171Nope
301/02/20171Nope
41Nope
501/05/20172Combined
601/06/20182Combined
72Combined
Sheet1
Cell Formulas
RangeFormula
C2{=IF(SUM(0+(FREQUENCY(IF($B$2:$B$7=B2,IF(ISNUMBER($A$2:$A$7),YEAR($A$2:$A$7))),YEAR($A$2:$A$7))>0))=1,"Nope","Combined")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
thanks again sir your array formula work but can i add another column that will show me the year? like this


Excel 2013/2016
ABCD
1DateGroup CodeRemarksYear
201/01/20171Nope2017
301/02/20171Nope2017
41Nope2017
501/05/20172Combined2017, 2018
601/06/20182Combined2017, 2018
72Combined2017, 2018
Sheet1
 
Upvote 0
can i add another column that will show me the year?

Hi, I don't think it will be easy to list the years in the same cell without using VBA of some sort, maybe in the form of a UDF or we could probably list the years in seperate cells (like below) if VBA is not option.

What are your thoughts?


Excel 2013/2016
ABCDEF
1DateGroup CodeRemarksYears..
201/01/20171Nope2017
301/02/20171Nope2017
41Nope2017
501/05/20172Combined201720182019
601/06/20182Combined201720182019
701/06/20162Combined201720182019
82Combined201720182019
Sheet1
 
Upvote 0

Forum statistics

Threads
1,216,179
Messages
6,129,332
Members
449,502
Latest member
TSH8125

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