tblackwell
New Member
- Joined
- Oct 24, 2018
- Messages
- 28
- Office Version
- 365
- Platform
- Windows
Situation: Simple nested IF statement that looks for time in one column and returns value in another column.
Formula: =IF(E46=TIME(3,0,0),I46,IF(E46=TIME(2,0,0),H46,IF(E46=TIME(1,0,0),G46,IF(E46=TIME(0,0,0),AD46,IF(E46=TIME(23,0,0),AC46,AB46)))))
Hint: This formula is in column AF
Expected result: If time in E46 is 1:00 AM, then return value in G46 ($431.34)
Problem: If time in E46 is 1:00 AM, then returns the FALSE value in AB46 ($1,541.64). What am I doing wrong? *Bangs head against wall*
System: Windows 10 Pro
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]8[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]23[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]P4'18 - P9 '18[/TD]
[TD="align: center"]46[/TD]
[TD="align: right"]1:00 AM[/TD]
[TD="align: right"] $ 431.34 [/TD]
[TD="align: right"] $ 1.86 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"] $ - [/TD]
[TD="align: right"] $ 0.82 [/TD]
[TD="align: right"] $ 644.10 [/TD]
[TD="align: right"] $ 2,807.94 [/TD]
[TD="align: right"] $ 3,999.49 [/TD]
[TD="align: right"] $ 3,048.39 [/TD]
[TD="align: right"] $ 2,120.80 [/TD]
[TD="align: right"] $ 1,724.30 [/TD]
[TD="align: right"] $ 1,655.59 [/TD]
[TD="align: right"] $ 2,231.40 [/TD]
[TD="align: right"] $ 2,610.06 [/TD]
[TD="align: right"] $ 2,370.69 [/TD]
[TD="align: right"] $ 1,995.78 [/TD]
[TD="align: right"] $ 1,541.64 [/TD]
[TD="align: right"] $ 1,062.71 [/TD]
[TD="align: right"] $ 800.28 [/TD]
[TD="align: center"] $ 1,541.64 [/TD]
</tbody>
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]AF46[/TH]
[TD="align: left"]=IF(E46=TIME(3,0,0),I46,IF(E46=TIME(2,0,0),H46,IF(E46=TIME(1,0,0),G46,IF(E46=TIME(0,0,0),AD46,IF(E46=TIME(23,0,0),AC46,AB46)))))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Formula: =IF(E46=TIME(3,0,0),I46,IF(E46=TIME(2,0,0),H46,IF(E46=TIME(1,0,0),G46,IF(E46=TIME(0,0,0),AD46,IF(E46=TIME(23,0,0),AC46,AB46)))))
Hint: This formula is in column AF
Expected result: If time in E46 is 1:00 AM, then return value in G46 ($431.34)
Problem: If time in E46 is 1:00 AM, then returns the FALSE value in AB46 ($1,541.64). What am I doing wrong? *Bangs head against wall*
System: Windows 10 Pro
E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AF | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
puw close sun-thu_LY | Row Labels | ||||||||||||||||||||||||||
6052 |
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]8[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]23[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DDEBF7]#DDEBF7[/URL] , align: center"]P4'18 - P9 '18[/TD]
[TD="align: center"]46[/TD]
[TD="align: right"]1:00 AM[/TD]
[TD="align: right"] $ 431.34 [/TD]
[TD="align: right"] $ 1.86 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"] $ - [/TD]
[TD="align: right"] $ 0.82 [/TD]
[TD="align: right"] $ 644.10 [/TD]
[TD="align: right"] $ 2,807.94 [/TD]
[TD="align: right"] $ 3,999.49 [/TD]
[TD="align: right"] $ 3,048.39 [/TD]
[TD="align: right"] $ 2,120.80 [/TD]
[TD="align: right"] $ 1,724.30 [/TD]
[TD="align: right"] $ 1,655.59 [/TD]
[TD="align: right"] $ 2,231.40 [/TD]
[TD="align: right"] $ 2,610.06 [/TD]
[TD="align: right"] $ 2,370.69 [/TD]
[TD="align: right"] $ 1,995.78 [/TD]
[TD="align: right"] $ 1,541.64 [/TD]
[TD="align: right"] $ 1,062.71 [/TD]
[TD="align: right"] $ 800.28 [/TD]
[TD="align: center"] $ 1,541.64 [/TD]
</tbody>
weekday
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]AF46[/TH]
[TD="align: left"]=IF(E46=TIME(3,0,0),I46,IF(E46=TIME(2,0,0),H46,IF(E46=TIME(1,0,0),G46,IF(E46=TIME(0,0,0),AD46,IF(E46=TIME(23,0,0),AC46,AB46)))))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]