Filehost.ro - gazduire fisiere
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.
Nou pe simpatie:
Andreea_K din Caras Severin
Femeie
25 ani
Caras Severin
cauta Barbat
30 - 49 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[EXCEL] Extract Value of Duplicated Month When First Value is Blank

Pagini: 1 Moderat de TRaP, TonyTzu
pus acum 3 saptamani#1
TRaP
Moderator
Postari: 960
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


 
   
Pagini: 1  
Mergi la