Converting an excel IF formula to a Powerpivot DAX formula - excel-formula

Im struggling to find a solution for a formula conversion from excel to powerpivot.
Its relatively simple in excel. I want to return a value that says >8000 or <8000 depending on the value of column A (measured depth)
Here is the formula in excel
=IF(A2>8000,"> 8,000",(IF(A2<8001,"<8,000",IF(A2=0,"UNDEFINED"))))
Any help would be greatly appreciated
Thanks
David

Try something like this:
=IF([columnName]>8000,"> 8,000",IF([columnName]<8001,"<8,000","UNDEFINED"))

Related

Excel; assistance with formulas

I'm having an issue using the correct COUNTIF formula in excel.
Wondering if anyone can help.
Countifs will do the trick - screenshot refers:
=COUNTIFS(E5:E10,"="&"",F5:F10,"<>"&"")

Excel Date Format Change through text formula

I have been trying to change the Excel date 31/03/2020 to =TEXT(D4,"MM-DD-YYYY") but its not working is there any other way to do this by Excel Formula.
Any help will be appreciated.
You will need to use LEFT, MID and RIGHT.
=MID(D4,4,2)&"-"&LEFT(D4,2)&"-"&RIGHT(D4,4)

Excel - copy values according to transposition

I have a table on an Excel sheet formatted like this
I managed to transpose column A and B so I have this
and I'd finally like to have something like this
Does anyone have an idea what formula to use in order to achieve this ?
I have a looong formula mixing INDEX, MATCH, IF but that doesn't seem to be good...
Thanks a lot

How to convert this formula into a VBA code?

I'm starting to study VBA but even searching for the functions needed for this I could not mount the VBA code. I searched for the functions to simulate INDEX and MATCH in VBA, but I could not mount the code correctly.
I have a table to fill where in each cell is the following formula, for example in cell C11:
=IF(INDEX('Sheet1'!$G:$G;MATCH($B11&C$10;'Sheet1'!$B:$B&'Sheet1'!$A:$A;0))<>"";"sm";
IF(INDEX('Sheet1'!$E:$E;MATCH($B11&C$10;'Sheet1'!$B:$B&'Sheet1'!$A:$A;0))<>"";"ok";0))
I would like to transform this formula into a VBA code.
Thanks in advance for the help!

Google Spreadsheet Version of COUNTIFS statement

I need to convert the formula below to a googledoc available formula. I've had trouble doing this with array formulas.
=COUNTIFS(Sheet1!J:J,"M",Sheet1!K:K,"Yes")
This?
=ARRAYFORMULA(COUNTIF(A2:A13,"m")+COUNTIF(B2:B13,"yes"))/2
Divide by the total columns you are searching...

Resources