Home > Net >  Excel sequential number to values in a list, skipping a column for the Vlookup formula
Excel sequential number to values in a list, skipping a column for the Vlookup formula

Time:11-25

I'm trying to write a formula where it will fill out the rest of the column based on another column. Basically, fill out sequential numbers, AND if one of them repeats, skip the ones that repeat and go to the next one that doesn't. So from this image: sequential_dropdown_list Which would be based on Column A, but without the spaces.

CodePudding user response:

The formula you had is pretty close. Just drop the VLOOKUP entirely, since you wanted the cells in between to be blank: =IF(COUNTIF(C$2:C2,C2)=1,MAX(A$1:A1) 1,"")

PS you say you wanted the COUNTIF results greater than 1 to show blank, since you wanted to use that for a future case. I doubt not showing data there would come in handy later. What do you have in mind?

CodePudding user response:

You need to organize your data so that the value you look up (C2) is to the left of the return value you want to find. In your case VLOOKUP(C2,C$1:D1,2,0), your return value should be in D column.

Formula cell E2:

=IF(COUNTIF(C$1:C2,C2)=1,MAX(E$1:E1) 1,VLOOKUP(C2,C$1:D1,2,0))

Results:

excel

  • Related