+ Reply to Thread
Results 1 to 6 of 6

Select range till where column AG has "BB" value

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Select range till where column AG has "BB" value

    hello
    i m using below line to get range of data,
    Please Login or Register  to view this content.
    i want this one get only range according to column AG

    i mean
    i have data in c10:c100 and ag10:ag50 has a value "BB"

    then select the range C10:C50 not C10:C100 which below line will do
    Please Login or Register  to view this content.
    thanx

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Select range till where column AG has "BB" value

    Hi, haroon2015,

    you would need to make clear if the data is thoroughly "BB" or not.

    Maybe like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    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: Select range till where column AG has "BB" value

    One way, something like:

    Please Login or Register  to view this content.

    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


  4. #4
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Select range till where column AG has "BB" value

    Hello HaHoBe

    Range C10:C300 has Names and
    Range AG10:AG300 has Value "N", "BB" and "BBB", i want if AG10:AG15 has a value "BB"
    then select the range C10:C15

  5. #5
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Select range till where column AG has "BB" value

    Hello HaHoBe

    absolutely perfect as always in first attempt and u better understand what OP wants,

    thanx a lot and will add reputation as always i do

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Select range till where column AG has "BB" value

    Hi, haroon2015,

    your post does not fully answer what I want to know. I understand that AG10:Ag15 hold BB but will this item appear later on as well? If not my code should do fine. If yes you should use a loop to determine the first appearance of the item and leave the loop when a different item is found to get the row number to "Select" (whyever you think you need to Select or Activate and what may be proven to be just a waste of time).

    Ciao,
    Holger

+ 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] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  2. Replies: 2
    Last Post: 06-06-2013, 12:45 PM
  3. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  4. Macro to select variable first row in column "D" till lastvisible row after filter
    By DiegoBoffa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2012, 12:41 PM
  5. "Criteria Range" in the "Data/Filter/Advanced Filter" to select Du
    By TC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-11-2005, 10:06 PM

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