Using SUMPRODUCT with LEN to check if the amount of characters is okay minus second row ?

MasterBash

Board Regular
Joined
Jan 22, 2022
Messages
61
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am currently using this formula :

=IF($B$5-1=SUMPRODUCT(--(LEN((Table1[Column3]))=10)),"OK","Not OK")

So what it does is calculate if $B$5-1 = the sum of the product in table1 column3 that are 10 characters long.

Column3
24/10/2024
1006784525
1006784527
1006784522
9876543210
0123456789
1234567890
5559997775

Problem is that the second row (first row after the table header) is a date, and depending on the date, it may or may not count the date as 10 characters long, so it may or may not be ok.

I am wondering - is there a way to simply ignore the second row (lets call it A2) ? Or is there a better way to do it ?

Thank you.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I assume that the table column values are text values. If that is so, what about this (looks for 10 characters but excludes if a "/" is found)?
Excel Formula:
=LET(t,Table1[Column3],IF($B$5-1=ROWS(FILTER(t,(LEN(t)=10)*(FIND("/",t&"/")=11))),"OK","Not OK"))

Or, taking your previous approach of just looking for 10 characters, and omitting the first value in the column as you suggested
Excel Formula:
=LET(t,Table1[Column3],IF($B$5-1=SUMPRODUCT(--(LEN(INDEX(t,2):INDEX(t,ROWS(t)))=10)),"OK","Not OK"))
 
Last edited:
Upvote 1
Solution

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top