+ Reply to Thread
Results 1 to 11 of 11

Assign Number to row

  1. #1
    Registered User
    Join Date
    05-01-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Assign Number to row

    Hi guys,

    I have a list of numbers such as:
    A01
    A23
    A53
    A64
    A74
    A128
    B01... the goes on too approximatly D128

    and i wanted to know if there is a way to assign the value to the row?
    For example:
    A23 in column A row 23
    A53 in column A row 53

    is there any method that achieves this?

    Kind Regards,

    Tai
    Last edited by VBA Noob; 05-01-2009 at 03:25 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Assign Number to row

    Try this:

    ="A"&ROW()

    If you want the "A" and the "23" to both be automatic, try this:

    =ADDRESS(ROW(),COLUMN(),4)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Assign Number to row

    =MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ",COLUMN(A1),1)&ROW(A1)

    copy down and across for up to 26 columns if needed
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    05-01-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Assign Number to row

    Hey,

    Thanks for the reply,

    I ment from the list i want to move the values automatically to that sepecific cell. the list of numbers is in a random order, and i want the values to be in the right column and row.

    A01
    A23
    A53 < This is the list in random order
    A64
    A74
    A128
    B01...

    And i want it to be moved automatically in the correct row and column eg:

    A64 must move to :

    column A
    Row
    62
    63
    64 A64

    and show that value

    sorry guys should have made it clear at the begining, i do apologise!

    Regards,

    Tai
    Last edited by tai10-01; 05-01-2009 at 03:38 PM.

  5. #5
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    Thumbs up Re: Assign Number to row

    Hi Tai,

    Use this code:
    Please Login or Register  to view this content.
    Refer the attached file.

    Regards,
    Karan
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-01-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Assign Number to row

    Iv attached a sample file, so you can see what you have to deal with.

    basically in the sample file you will notice there are 4 sheets each sheet has different data.

    for example sheet 1:

    Field1 Field 2
    A13 WS42 7NE

    I want the value in field 2 which is WS42 7NE to move to row A13.

    Hope this clarifies thinfs
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-01-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Assign Number to row

    yeah karan, that is the sort of thing what i am looking for! however is it possible to move the value next to it too? check the sample data file i have attached

  8. #8
    Registered User
    Join Date
    04-28-2009
    Location
    Chicago, IL, USA
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Assign Number to row

    That's trivial at this stage, you need to resize each selection. Replace Karan's critical line with this:

    Please Login or Register  to view this content.
    But as long as we're on the topic, can someone point me to a good resource explaining Mid() better? I have been confounded in trying to find a good resource. It could be because I'm looking for a really good regular expression engine for excel, but Mid looks like it's more useful than I'd realized.

    Anyone know where a good Mid 101 is?

    Thanks

  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: Assign Number to row

    Matt, please don't ask questions in someone else's thread -- start your own.

    If you've not read the forum rules, now would be a good time to do so.
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Registered User
    Join Date
    04-28-2009
    Location
    Chicago, IL, USA
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Assign Number to row

    My apologies. I read the rules, but I figured it was on-topic to the original question. I will go start a new thread.

    Thanks.

  11. #11
    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: Assign Number to row

    Thanks, Matt.

    VBA has excellent support for regular expressions. We can talk about it in your new thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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