+ Reply to Thread
Results 1 to 2 of 2

Excel vba

  1. #1
    Registered User
    Join Date
    10-16-2023
    Location
    US
    MS-Off Ver
    2019
    Posts
    1

    Excel vba

    Hello, I am trying to code that locates the position of a cell in VBA.


    a=Range("b").Value
    Range("C")(1, 1 + 8 * (a - 1) = "hello"

    The "1+8*(a-1)" part does not work. Could someone please help solve this problem? Thank you in advance.

    -M

  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,669

    Re: Excel vba

    The code does not work because it makes no sense. Range("b"). Value will not work, unless b happens to be a Named Range. Similarly, in Range("C"), C would also need to reference a Named Range.

    Please explain what you are trying to do.


    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    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


+ 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