#name?

Are you able to get it working on a simple data set before combining with other functions?

This is the formula I tried to use on this value 35738 =ACONCAT(IF(MOD((MID($AH13,{1,2,3,4,5},1)+0),2)=0,"E","O")) results should be OOOOE.
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How about this?


Excel 2010
AB
135738OOOOE
21128764OOEEOEE
Sheet14
Cell Formulas
RangeFormula
B1=evendig(A1)
B2=evendig(A2)


Code:
Function evendig(str As String)
Dim i%, arr As Variant
ReDim arr(Len(str))
For i = 1 To Len(str)
If Val(Mid(str, i, 1)) Mod 2 <> 0 Then
arr(i - 1) = "O"
Else
arr(i - 1) = "E"
End If
Next
evendig = Join(arr, "")
End Function
 
Upvote 0
Aladin , thank you for responding. I re-entered the formula as you said, still did not work.
 
Upvote 0
How about this?


Excel 2010
AB
135738OOOOE
21128764OOEEOEE
Sheet14
Cell Formulas
RangeFormula
B1=evendig(A1)
B2=evendig(A2)


Code:
Function evendig(str As String)
Dim i%, arr As Variant
ReDim arr(Len(str))
For i = 1 To Len(str)
If Val(Mid(str, i, 1)) Mod 2 <> 0 Then
arr(i - 1) = "O"
Else
arr(i - 1) = "E"
End If
Next
evendig = Join(arr, "")
End Function

That worked.
ThanksI need another macro for H/L digits. High = 56789; =L=01234
 
Upvote 0
Aladin , thank you for responding. I re-entered the formula as you said, still did not work.

It works over here...

When
AH13 = 35738

=ACONCAT(IF(MOD((MID($AH13,{1,2,3,4,5},1)+0),2)=0,"E","O"))

results in:

OOOOE

Control+shift+enter: Press down the control and the shift keys at the same time while you hit the enter key. If done properly, Excel itself puts a pair of { and } around the formula in recognition.

 
Last edited:
Upvote 0
It works over here...

When
AH13 = 35738

=ACONCAT(IF(MOD((MID($AH13,{1,2,3,4,5},1)+0),2)=0,"E","O"))

results in:

OOOOE

Control+shift+enter: Press down the control and the shift keys at the same time while you hit the enter key. If done properly, Excel itself puts a pair of { and } around the formula in recognition.


I started from scratch and it does work. Would you please do one for high 56789 and low 01234 digits?
 
Upvote 0
That worked.
ThanksI need another macro for H/L digits. High = 56789; =L=01234

Code:
Function hilodig(str As String)
Dim i%, arr As Variant
ReDim arr(Len(str))
For i = 1 To Len(str)
If Val(Mid(str, i, 1)) < 5 Then
arr(i - 1) = "L"
Else
arr(i - 1) = "H"
End If
Next
evendig = Join(arr, "")
End Function
 
Last edited:
Upvote 0
Something like:

=ACONCAT(IF(MID($AH13,{1,2,3,4,5},1)+0<5,"L","H"))

for the formula
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,207
Members
448,554
Latest member
Gleisner2

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