+ Reply to Thread
Results 1 to 14 of 14

array variables

  1. #1
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    array variables

    I don't know how it's possible, but I have a reversed defining variables. Horizontal is Vertical and Vertical is Horizontal. How to fix it? Please see example below. If I use";" to separate values then it should works for rows, not for columns - right?
    1.png
    2.png
    Last edited by radek225; 09-23-2015 at 04:38 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,364

    Re: array variables

    Select cells B1:F1 and type
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and press Ctrl-Shift Enter to commit the formula rather than just Enter

    Select cells A2:A6 and type
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and press Ctrl-Shift Enter to commit the formula rather than just Enter

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array variables

    Yes I know about ctrl+shift+enter.

    If I try my formula for another PC then everthing is correct.

    separator "\" - for columns and ";" for rows, but in my PC ";" is for columns and "\" for rows - why it's reversed in my pc?

  4. #4
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array variables

    Quote Originally Posted by TMS View Post
    Select cells B1:F1 and type
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and press Ctrl-Shift Enter to commit the formula rather than just Enter

    Select cells A2:A6 and type
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and press Ctrl-Shift Enter to commit the formula rather than just Enter

    Regards, TMS
    Yes I know about ctrl+shift+enter.

    If I try my formula in another PC then everthing is correct.

    separator "\" - for columns and ";" for rows, but in my PC ";" is for columns and "\" for rows - why it's reversed in my pc?
    BTW yours first formula is wrong

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: array variables

    You are correct that ; is for rows and , is for columns.

    Here is something to play with.
    1. Select A1:A5 and enter the following formula with Ctrl + Shift + Enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The result should be all 1s down the column.

    2. Select A1:A5 click on Find and Select, Replace.
    3. In Find What enter ,
    4. In Replace With enter ;
    5. Replace All

    The result should be the numbers from 1 to 5 down the column

    Try the same thing in row 1. Select A1 to E1 and enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    When you enter with Ctrl + Shift + Enter the result should be all 1s
    Now select A1:E1 click on Find and Select, Replace
    In the Find What enter ;
    In the Replace With enter ,
    Replace All

    The result should be the numbers from 1 to 5 in the row.

    I hope that this helps.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array variables

    Quote Originally Posted by newdoverman View Post
    You are correct that ; is for rows and , is for columns.

    Here is something to play with.
    1. Select A1:A5 and enter the following formula with Ctrl + Shift + Enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The result should be all 1s down the column.

    2. Select A1:A5 click on Find and Select, Replace.
    3. In Find What enter ,
    4. In Replace With enter ;
    5. Replace All

    The result should be the numbers from 1 to 5 down the column

    Try the same thing in row 1. Select A1 to E1 and enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    When you enter with Ctrl + Shift + Enter the result should be all 1s
    Now select A1:E1 click on Find and Select, Replace
    In the Find What enter ;
    In the Replace With enter ,
    Replace All

    The result should be the numbers from 1 to 5 in the row.

    I hope that this helps.
    If I use "," then get an error. You can only use ";" for rows and "\" for columns in array. Not "," to separate values

    Please note that if I work in another computer then everthing is ok.
    Last edited by radek225; 09-23-2015 at 05:18 PM.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,364

    Re: array variables

    I suspect that you have changed your Regional Settings.

    Regards, TMS

  8. #8
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array variables

    Quote Originally Posted by TMS View Post
    I suspect that you have changed your Regional Settings.

    Regards, TMS
    In both PCs are the same

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: array variables

    How about Options > Advanced > Editing Options, Use System Separators?
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: array variables

    Here is an interesting bit on the separators for French regional settings.
    http://stackoverflow.com/questions/2...-excel-formula

    Everything that I have found indicates as TMS suggests that the Regional Settings are at play here.

  11. #11
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array variables

    Quote Originally Posted by shg View Post
    How about Options > Advanced > Editing Options, Use System Separators?
    The same in both PCs too

  12. #12
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array variables

    Ok, now I know. It's really sad what Microsoft made:/.

    In Ms Office 2007 ";" - for rows and "\" for columns
    In Ms Office 2013 ";" - for columns and "\" for rows

  13. #13
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: array variables

    If you have the Regional settings correct you should get the correct results. The problem lies when a conversion has to be manually made from one regions settings to another.

    What region has settings that are causing you problems?... just curious.

  14. #14
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array variables

    Quote Originally Posted by newdoverman View Post
    If you have the Regional settings correct you should get the correct results. The problem lies when a conversion has to be manually made from one regions settings to another.

    What region has settings that are causing you problems?... just curious.
    Poland

    I tried two version of MS Offfice on the same machine now. as a result two different cases

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 10-12-2014, 01:27 PM
  2. [SOLVED] VBA Declare Variables with array
    By bkeat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2014, 11:35 AM
  3. Variables in Array function
    By gan_xl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-29-2013, 11:24 AM
  4. [SOLVED] finding an output from 5 variables in an array using exterior input user variables
    By Allsort in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2013, 11:16 AM
  5. [SOLVED] VBA Array With Variables
    By amotto11 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2013, 11:07 AM
  6. select variables ranges, copy to array, paste the array in new workbook
    By Mathew in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2005, 05:06 AM
  7. How to use array formula for three variables?
    By MelissaS in forum Excel General
    Replies: 2
    Last Post: 01-20-2005, 10:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1