excel - Should I break my data into smaller pieces? -
i have excel sheet on 1,000,000 rows need perform vlookups/countif statements. should run vb macros on single sheet data, or splitting data 50,000 increments on separate sheets running macro on each sheet create significant time savings? there equation out there can me make decision?
thanks help.
here vb plan use, (though more looking general answer, if there one, can apply when deal these large db extractions in excel):
sub find_space_then_compare() ' ' finds space in key, extracts character after, , looks match in sample2 sheet activecell.formular1c1 = "=mid(rc[-1],find("" "",rc[-1])+1,256)" range("b2").select selection.autofill destination:=range("b2:b100") range("b2:b100").select range("c2").select activecell.formular1c1 = "=vlookup(rc[-1],sample2!r81c3:r121c3,1)" range("c2").select selection.autofill destination:=range("c2:c100") range("c2:c100").select end sub
it's terrible such huge database, suggest split database few pieces , apply formula. below example 2 pieces.
=if(not(isna(vlookup(a1,data1,2,false))),vlookup(a1,data1,2,false),if(isna(vlookup(a1,data2,2,false)),"no match",vlookup(a1,data2,2,false)))
Comments
Post a Comment