+ Reply to Thread
Results 1 to 10 of 10

error trying to get cells column value

  1. #1
    Forum Contributor
    Join Date
    07-22-2013
    Location
    Sibiu
    MS-Off Ver
    Excel 2007
    Posts
    114

    error trying to get cells column value

    Please Login or Register  to view this content.
    "Object variable or With block variable not set (Error 91)" is the error i get on the last line of code.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: error trying to get cells column value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Cheers!
    Deep Dave

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: error trying to get cells column value

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-22-2013
    Location
    Sibiu
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: error trying to get cells column value

    test1.xlsm
    What I need is a value for the row where the value from the dropdown list is found on the Y sheet, and a value for the column in the X sheet.

    Doesnt work John, sry.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: error trying to get cells column value

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: error trying to get cells column value

    That is happening because you have merged cells.

    If you change to this line, it will work

    Set rngsearch2 = st2.Range("c19:C21")

  7. #7
    Forum Contributor
    Join Date
    07-22-2013
    Location
    Sibiu
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: error trying to get cells column value

    I'm trying something, will comeback with a reply.
    Last edited by a.hudrea; 09-04-2015 at 08:19 AM.

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: error trying to get cells column value

    Umm. Worked for me on the sample you provided. Msgbox with 4 then a msgbox with 8. Note changes too code to be made.

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    07-22-2013
    Location
    Sibiu
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: error trying to get cells column value

    Sorry for the late reply. It does work John ty so much guys for the help. I did not notice the resize part.

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: error trying to get cells column value

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. If all required cells are in column, return Correct, else Error
    By ottoex in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-10-2014, 11:43 PM
  2. Average, avoid column or cells where error
    By hassan88 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-01-2013, 04:05 PM
  3. VBA: locating any error cells in a given column
    By niceguy21 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-25-2013, 11:56 AM
  4. [SOLVED] How to do sum-up for a column and ignore error cells?
    By BNCOXUK in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-26-2013, 08:10 AM
  5. unused dropdown cells causing #VALUE! error in column totals
    By auburnfan03 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-03-2012, 12:53 PM
  6. [SOLVED] Counting number of non-blank cells in column......but getting run time error in vba
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-30-2012, 10:54 AM
  7. Cells(row,column) error
    By redBo1000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2007, 10:46 AM

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