So I think something like:
=index(A1:A10,randbetween(2,10))
in D2 and D4
then a macro for the yes button:
Sub macro_yes()
dim found_it
for count = 10 to Range("F" & rows.count).end(xlup).row
if worksheetfunction.countif(Range("F" & count & ":AA" & count),"="&Range("D2"))>0 or worksheetfunction.countif(Range("F" & count & ":AA" & count),"="&Range("D4"))>0 then
if worksheetfunction.countif(Range("F" & count & ":AA" & count),"="&Range("D2"))=0 then cells(count,columns.count).end(xltoleft).offset(0,1) = Range("D4")
if worksheetfunction.countif(Range("F" & count & ":AA" & count),"="&Range("D4"))=0 then cells(count,columns.count).end(xltoleft).offset(0,1) = Range("D2")
found_it = 1
end if
next
if not found_it = 1 then
Range("F" & rows.count).end(xlup).offset(1,0) = Range("D2")
Range("F" & rows.count).end(xlup).offset(0,1) = Range("D4")
end if
application.calculate
end sub
and a macro for the no button:
sub macro_no()
application.calculate
end sub
You will need calculation set to manual for this solution.
Bookmarks