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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
it is works Manuela By Press Ctr+Shift and Entr, is there any way to do like this such as send Keys.
 
Upvote 0
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?
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,219,100
Messages
6,146,281
Members
450,684
Latest member
wilto1tg

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