Formula to show whether invoice is paid AND/OR approved

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
126
Office Version
2016
Platform
Windows
<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: #C0C0C0;;">Invoice </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: #C0C0C0;;">Approved</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: #C0C0C0;;">Payment Date</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="text-align: center;border-top: 1px solid black;;">1</td><td style="text-align: center;border-top: 1px solid black;;">500</td><td style="text-align: center;border-top: 1px solid black;;">01/01/19</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style="text-align: center;;">1</td><td style="text-align: center;;">500</td><td style="text-align: center;;">01/01/19</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="text-align: center;;">1</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style="text-align: center;;">1</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style="text-align: center;background-color: #E7E6E6;;">2</td><td style="text-align: center;background-color: #E7E6E6;;">501</td><td style="text-align: center;background-color: #E7E6E6;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style="text-align: center;background-color: #E7E6E6;;">2</td><td style="text-align: center;background-color: #E7E6E6;;">501</td><td style="text-align: center;background-color: #E7E6E6;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style="text-align: center;background-color: #E7E6E6;;">2</td><td style="text-align: center;background-color: #E7E6E6;;"></td><td style="text-align: center;background-color: #E7E6E6;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">9</td><td style="text-align: center;background-color: #E7E6E6;;">2</td><td style="text-align: center;background-color: #E7E6E6;;"></td><td style="text-align: center;background-color: #E7E6E6;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">10</td><td style="text-align: center;;">3</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">11</td><td style="text-align: center;;">3</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">12</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">13</td><td style="text-align: center;border-bottom: 1px solid black;;"></td><td style="text-align: right;border-bottom: 1px solid black;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">14</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #000000;;">Invoice </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #000000;;">Status</td><td style="text-align: center;border-left: 1px solid black;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">15</td><td style="text-align: center;border-top: 1px solid black;;">1</td><td style="text-align: center;border-top: 1px solid black;;">Paid</td><td style="text-align: center;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">16</td><td style="text-align: center;;">2</td><td style="text-align: center;;">Approved</td><td style="text-align: center;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">17</td><td style="text-align: center;;">3</td><td style="text-align: center;;">Not Approved</td><td style="text-align: center;;"></td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet3</p><br /><br />
Hello guys,

I have a sheet with invoice information which can be categorized as either:

- Approved = there is a value in Column B but not in Column C
- Paid = there is a value in Column C
- Not Approved= there are no values in Column C AND Column B

B15:B17 is the output I am looking for.
How would you go about creating a formula to show this output?

Invoice 1:
Rows 4-5 represent the booking of invoice 1
Rows 2-3 show that invoice 1 has been paid since there is a date in Column C

FWIW
If an invoice has been paid, as in the case of invoice 1, I don't need to know whether it has been approved or not.


Thank you :)




 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,146
Hi,

Would there be an instance where, for example, C6 has a date, but C7 does not, what would be the result then?
 

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
126
Office Version
2016
Platform
Windows
Would there be an instance where, for example, C6 has a date, but C7 does not, what would be the result then?
Hi jtakw - that will not occur, no.
 
Last edited:

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,146
Then, try this:

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style=";">Invoice</td><td style=";">Approved</td><td style=";">Payment Date</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="text-align: right;;">1</td><td style="text-align: right;;">500</td><td style="text-align: right;;">1/1/2019</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style="text-align: right;;">1</td><td style="text-align: right;;">500</td><td style="text-align: right;;">1/1/2019</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="text-align: right;;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style="text-align: right;;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style="text-align: right;;">2</td><td style="text-align: right;;">501</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style="text-align: right;;">2</td><td style="text-align: right;;">501</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style="text-align: right;;">2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">9</td><td style="text-align: right;;">2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">10</td><td style="text-align: right;;">3</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">11</td><td style="text-align: right;;">3</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">12</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">13</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">14</td><td style=";">Invoice</td><td style=";">Status</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">15</td><td style="text-align: right;;">1</td><td style=";">Paid</td><td style=";">Paid</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">16</td><td style="text-align: right;;">2</td><td style=";">Approved</td><td style=";">Approved</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">17</td><td style="text-align: right;;">3</td><td style=";">Not Approved</td><td style=";">Not Approved</td></tr></tbody></table><p style="width:6.4em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet691</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">C15</th><td style="text-align:left">=IF(<font color="Blue">COUNTIFS(<font color="Red">A$2:A$11,A15,B$2:B$11,">0"</font>),IF(<font color="Red">COUNTIFS(<font color="Green">A$2:A$11,A15,C$2:C$11,">0"</font>),"Paid","Approved"</font>),"Not Approved"</font>)</td></tr></tbody></table></td></tr></table><br />

C15 formula copied down, change/adjust cell references/range as needed.
 

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
126
Office Version
2016
Platform
Windows
Then, try this:

ABC
1InvoiceApprovedPayment Date
215001/1/2019
315001/1/2019
41
51
62501
72501
82
92
103
113
12
13
14InvoiceStatus
151PaidPaid
162ApprovedApproved
173Not ApprovedNot Approved

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet691

Worksheet Formulas
CellFormula
C15=IF(COUNTIFS(A$2:A$11,A15,B$2:B$11,">0"),IF(COUNTIFS(A$2:A$11,A15,C$2:C$11,">0"),"Paid","Approved"),"Not Approved")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



C15 formula copied down, change/adjust cell references/range as needed.

Thank you so much! It works beautifully.
You've made my day :)
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,146
You're welcome, welcome to the forum, and thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,102,645
Messages
5,488,077
Members
407,623
Latest member
Deigs

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top