Excel Formula Question (=IF Function)

TravelMI

New Member
Joined
Oct 4, 2016
Messages
10
Hi,

I am trying to return values of Invoice or Credit Note in column B based on the first letter or digit from column A. The table below shows what the requirements are (E.G M or 4 = Invoice, 7 = Credit Note. However, I'm stuck with the formula below and unsure of the formula required to allow the first two examples to be inputted with 'Invoice'. Any help appreciated.


=IF( ????? ,"Invoice","Credit Note")

Invoice #Label
M012345Invoice
412345Invoice
712345Credit Note

<tbody>
</tbody>


<colgroup><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi, welcome to the forum!

Is it safe to assume that if it's not an "Invoice" then it must be a "credit note"? If so, one option you could try:


Excel 2013
AB
1Invoice #Label
2M012345Invoice
3412345Invoice
4712345Credit Note
Sheet1
Cell Formulas
RangeFormula
B2=IF(OR(LEFT(A2)={"M","4"}),"Invoice","Credit Note")
 
Upvote 0
(E.G M or 4 = Invoice, 7 = Credit Note.

Or if there is only one option for credit note then it maybe simpler to say.

=IF(LEFT(A2)="7","Credit Note","Invoice")
 
Upvote 0
Hi,

Thank you for your quick response! Both formula do exactly what I was looking for but you are right with the second option being simpler.

I'll certainly be posting any other queries I have to this forum and try to answer any questions where I can!
 
Upvote 0

Forum statistics

Threads
1,215,275
Messages
6,124,002
Members
449,137
Latest member
abdahsankhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top