Array Formula and Column Error

Dossfm0q

Banned User
Joined
Mar 9, 2009
Messages
570
Office Version
  1. 2019
Platform
  1. Windows
The Formula Array work with Row() Ok, and Has error with Column() ! please help

Code:
Sub Rw()

    Range("A16:L40").[B][COLOR=#006400]FormulaArray[/COLOR] [/B]= "=IFERROR(MID(A1,FIND(""|"",SUBSTITUTE("",""&A1&"","","","",""|"",(ROW()-ROW(B$3)+1))),FIND("","",A1&"","",FIND(""|"",SUBSTITUTE("",""&A1&"","","","",""|"",(ROW()-ROW(B$3)+1))))-FIND(""|"",SUBSTITUTE("",""&A1&"","","","",""|"",(ROW()-ROW(B$3)+1)))),"""")"
End Sub
Get Err Mesage
unable to set the Array Formula property of the Range Class
Code:
Sub Col()
Range("A2:z118").Clear
    Range("A16:L40").[COLOR=#ff0000]FormulaArray[/COLOR] = "=MID($A1,FIND(""|"",SUBSTITUTE("",""&$A1&"","","","",""|"",(COLUMN()-COLUMN($B1)+1))),FIND("","",$A1&"","",FIND(""|"",SUBSTITUTE("",""&$A1&"","","","",""|"",(COLUMN()-COLUMN($B1)+1))))-FIND(""|"",SUBSTITUTE("",""&$A1&"","","","",""|"",(COLUMN()-COLUMN($B1)+1))))"




End Sub
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,647
Office Version
  1. 365
Platform
  1. Windows
You're welcome
 

Dossfm0q

Banned User
Joined
Mar 9, 2009
Messages
570
Office Version
  1. 2019
Platform
  1. Windows

ADVERTISEMENT

it is works Manuela By Press Ctr+Shift and Entr, is there any way to do like this such as send Keys.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,647
Office Version
  1. 365
Platform
  1. Windows
I've never used send keys as it's unreliable, so don't know.
Why not just the technique shown by pgc01 in the thread I linked to?
 

Dossfm0q

Banned User
Joined
Mar 9, 2009
Messages
570
Office Version
  1. 2019
Platform
  1. Windows
Hello here I have found answer for my problem. I have searched internet and get correct solution with <code style="margin: 0px; padding: 1px 5px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; background-color: rgb(239, 240, 241); white-space: pre-wrap; color: rgb(36, 39, 41);">.Replace</code> function. JUST I COPY AND PASTE

Code:
Sub Col()


    [A1] = "1,2,3,4"
   With Range("B1:E1")
        ' RPLACE TO ROW
         .FormulaArray = Replace("=MID($A1,FIND(""|"",SUBSTITUTE("",""&$A1&"","","","",""|"",(COLUMN()-COLUMN($B1)+1))),FIND("","",$A1&"","",FIND(""|"",SUBSTITUTE("",""&$A1&"","","","",""|"",(COLUMN()-COLUMN($B1)+1))))-FIND(""|"",SUBSTITUTE("",""&$A1&"","","","",""|"",(COLUMN()-COLUMN($B1)+1))))", "(COLUMN()-COLUMN($B1)+1)", "(ROW()-ROW($B1)+1)")
          'RETURN TO ORIGINAL
          .Replace What:="ROW", Replacement:="COLUMN", LookAt:=xlPart
    End With


End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,129,752
Messages
5,638,162
Members
417,011
Latest member
Amaden95

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
Top