Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Alexanndra1994 pe Simpatie.ro
Femeie
24 ani
Bucuresti
cauta Barbat
24 - 43 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Extract Value of Duplicated Month When First Value is Blank Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 8 ani
Postari: 951
I have a range of months and readings of water meters.

For the month of October there was a misread in the original data and the invoiced quantity was left blank. Then there's another entry for October with an invoiced quantity.

The formulas below will account for and return the quantity for October instead of the blank that appears first in the original data.

Ranges:
B17:B29 = original range of months, may contain duplicates
T17# =UNIQUE(B17:B29)
H17:H29 = original range of invoiced quantities, may contains blanks or minus index values (for which I added the lookup < -10000 condition in IFS)
(minus index values appear in the original data when a month of reading the water meter was skipped for some reason).

Solution 1: XLOOKUP + FILTER (Recommended) - skips blank cells entirely:

=LET(
  months; T17#;
  lookup; MAP(months; LAMBDA(m;
    XLOOKUP(m; FILTER(B17:B29; H17:H29 <> ""); FILTER(H17:H29; H17:H29 <> ""); 0)
  ));
  IFS(lookup < -10000; 0; TRUE; lookup)
)


Solution 2: Standard FILTER with INDEX:

=LET(
  months; T17#;
  lookup; MAP(months; LAMBDA(m;
    INDEX(FILTER(H17:H29; (B17:B29 = m) * (H17:H29 <> ""); 0); 1)
  ));
  IFS(lookup < -10000; 0; TRUE; lookup)
)


Source: Gemini


pus acum 4 zile
   
Pagini: 1  

Mergi la