Help with formula

jordanburch

Active Member
Joined
Jun 10, 2016
Messages
440
Office Version
  1. 2016
hey I have the following.

=+IF(OR(A8="SEPTEMBER","AUGUST","JULY"),CONCATENATE(LEFT(A9,3)-1,"-",TEXT(EDATE(DATEVALUE("01-"&A7),-2),"MMM"),RIGHT(A9,2)))

i cant get it to work right for some reason. any help is appreciated! I get the below error.

Jordan

a value used in the formula is the wrong data type.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
This part is incorrect:
VBA Code:
OR(A8="SEPTEMBER","AUGUST","JULY")
as with OR and AND, each condition needs to be declared explicitly.

So it should be:
VBA Code:
OR(A8="SEPTEMBER",A8="AUGUST",A8="JULY")

I cannot really speak to the rest, as you have not shown us your data.
If you still have issue, show us examples of what is in cells A7, A8, and A9 and show us your expected output.
 
Upvote 0
Solution
This part is incorrect:
VBA Code:
OR(A8="SEPTEMBER","AUGUST","JULY")
as with OR and AND, each condition needs to be declared explicitly.

So it should be:
VBA Code:
OR(A8="SEPTEMBER",A8="AUGUST",A8="JULY")

I cannot really speak to the rest, as you have not shown us your data.
If you still have issue, show us examples of what is in cells A7, A8, and A9 and show us your expected output.
thanks Joe Worked!
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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