refatore o código abaixo:
If( FiltroOrdem.Value = false, If( IsBlank(Pesquisa), If( filtro.Selected.Value = "Bl Pgto", Filter(Registros1, Blpgto = "90"), If( filtro.Selected.Value = "Bl Rem", Filter(Registros1, BlRem = "90"), If( filtro.Selected.Value = "Bl Cred", Filter(Registros1, BlCred = "B"), Registros1 ) ) ), If( filtro.Selected.Value = "Bl Pgto", Filter(Registros1, Blpgto = "90" && Pesquisa.Text in Title), If( filtro.Selected.Value = "Bl Rem", Filter(Registros1, BlRem = "90" && Pesquisa.Text in Title), If( filtro.Selected.Value = "Bl Cred", Filter(Registros1, BlCred = "B" && Pesquisa.Text in Title), Registros1 ) ) ) ), If( IsBlank(Pesquisa), If( filtro.Selected.Value = "Bl Pgto", Filter(Registros1, Blpgto = "90" && Ordem <> "0"), If( filtro.Selected.Value = "Bl Rem", Filter(Registros1, BlRem = "90" && Ordem <> "0"), If( filtro.Selected.Value = "Bl Cred", Filter(Registros1, BlCred = "B" && Ordem <> "0"), Registros1 ) ) ), If( filtro.Selected.Value = "Bl Pgto", Filter(Registros1, Blpgto = "90" && Pesquisa.Text in Title && Ordem <> "0"), If( filtro.Selected.Value = "Bl Rem", Filter(Registros1, BlRem = "90" && Pesquisa.Text in Title && Ordem <> "0"), If( filtro.Selected.Value = "Bl Cred", Filter(Registros1, BlCred = "B" && Pesquisa.Text in Title && Ordem <> "0"), Registros1 ) ) ) ) )