+ Reply to Thread
Results 1 to 4 of 4

Converting Cells to range

  1. #1
    Registered User
    Join Date
    05-30-2018
    Location
    Los Angeles
    MS-Off Ver
    2016
    Posts
    8

    Converting Cells to range

    I have VBA code where I cycle through rows (r) and columns (c) using for loops to find a value in a cell. Once I find that value I want to use the row and column values to save a defined range variable for use later

    Please Login or Register  to view this content.
    I am trying to research the format for saving the cells(r,c) as range format with column as letter not number

  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
    48,868

    Re: Converting Cells to range

    As an example:

    Please Login or Register  to view this content.
    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
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,051

    Re: Converting Cells to range

    Quote Originally Posted by jharding View Post
    I am trying to research the format for saving the cells(r,c) as range format with column as letter not number
    Cells will accept either a column number or a column letter.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    05-30-2018
    Location
    Los Angeles
    MS-Off Ver
    2016
    Posts
    8

    Re: Converting Cells to range

    Thank you both for your answers. I guess now that I am thinking about it and looking at the scenario, I might need to change up my logic. I am parsing a PDF into excel tabs. I then look for certain header text in a row to define which tab I need to use to parse the data (could be different each time I import the PDF).

    I have the code to cycle through each workbook, but instead of going through each row and cell to find a text value I could use range.find or worksheetfunction.match.

    I think to cover all possible scenarios, I need to try to match multiple text values that will be on a single row, but no necessarily next to each other. Would it make sense to find the row of the first text value and then find the second text value row and see if they are on the same row? Is there an easier way?

+ 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. [SOLVED] Converting formulas in a Range of CELLS which are in between SUB-TOTALs to Values with VBA
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-02-2023, 12:26 AM
  2. Automatic Converting of Cells Into Range Notation and Conditional Formatting
    By ajarmstron in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2022, 04:44 PM
  3. Replies: 8
    Last Post: 07-06-2022, 02:11 PM
  4. Converting a range of cells to their values
    By echo_oscar in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-22-2012, 10:38 AM
  5. Converting individual cells within a range from minutes to decimal hours
    By epyzdrh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2008, 09:53 AM
  6. converting to range datatype
    By ballack in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-13-2007, 04:38 AM
  7. Replies: 3
    Last Post: 01-14-2005, 03:06 PM

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