excel - If a cell contains any of these values, then label as this -
i want set formula in excel if column b (which contains dates) contains of dates in list of 7 dates, labeled "week 1", if not, it'll labeled "week 2". formula listed below returning #name error. thoughts?
ie: =if((b1,containsany=j1:j7), "week 1", "week 2")
as per screenshot, can date's week using weeknum
function. example, assuming dates start @ row 10, place formula in cell i10
, copy cells below, , week number.
=weeknum(b10,15)-36
the second parameter defines when week starts (15 = friday in case), , week 37th of year, subtract 36. :)
with approach, don't need hardcode dates in cells j1:k7, , it's future-proof. ;)
Comments
Post a Comment