1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

What formula for sequencing number but when adjacent row is blank it wont get sequenced

Our take

If you're looking to create a sequence of numbers in Google Sheets that skips blank rows, you've encountered a common challenge. The formula you've tried may not yield the desired outcome if blank rows are filled with hidden formulas. A more effective approach is to use `=IF(B14="", "", MAX(A$13:A13) + 1)`, which will correctly increment the sequence only for cells that contain data. This solution ensures that your sequence reflects the actual entries, providing a clearer view of your data without counting unintended blanks.

I have tried this formula form chat gpt: =IF(B14="","",COUNTIF($B$14:B14,"<>")) =IF(B14="","",SUBTOTAL(103,$B$14:B14)) =IF(B14="","",SUBTOTAL(103,B$14:B14))

But the blank row still get counted like: B1 has data, number 1 B2 has no data, blank B3 has data, number 3

What i want is: B1 has data, so its number 1 B2 has no data, so its blank B3 has data, so its number 2

Iam using google spreadsheets, sorry if it confusing iam still new here

*edit: thanks for the help everyone i think the previous formula not doing what i wanted is because the cell that i thought blank is filled with vlookup formula, iam using =IF(B14 = "", "", MAX(A$13:A13) + 1) and it work!

submitted by /u/Barusan_buat
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles

Tagged with