+ Reply to Thread
Results 1 to 6 of 6

Resize is displaying one extra row

  1. #1
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Resize is displaying one extra row

    Hello Experts
    I have this code to resize column J with column A. There are 167 rows in column A and the result is displaying in up to 168th row.in column J Please help me to edit the code and get the result in 167 rows only.
    Please Login or Register  to view this content.
    Last edited by RAJESH SHAH; 02-09-2023 at 01:35 PM. Reason: #Solved by Marc L

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Resize is displaying one extra row


    Hello,

    bad logic ! Just obviously use Range("J2:J" & Cells(Rows.Count, 1).End(xlUp).Row).Formula

    ► Do you like it ? ► So thanks to click on bottom left star icon « Add Reputation » !

  3. #3
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Resize is displaying one extra row

    Thanks Marc L. That worked perfect. To understand the code, If I want to resize with D instead of A I have to change Count 1 to Count 4. Tell me if I am right.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Resize is displaying one extra row


    That's it ! Anyway you can use your original Range syntax.

    Do not confuse the last row index and the resize rows # …

  5. #5
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Resize is displaying one extra row

    Please Login or Register  to view this content.
    [CODE]Range("Y7:Y" & Cells(Rows.Count, 1).End(xlUp).Row).Formula = "=VLOOKUP(X7,'B2B HP'!$R:$Z,9,0)"[/CODE
    I have to change it in multiple places. Is this is edited correct ? If this is correct, then I will edit all accordingly.

  6. #6
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,148

    Re: Resize is displaying one extra row

    I tested at 2 places and got it corrected. Thank you very much Marc L

+ 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. Help with drop down box and displaying extra data
    By CLHunter in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-14-2017, 10:43 AM
  2. [SOLVED] Macro to set extra extra thick outer border for selected column and row:
    By Chad Bateman in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-02-2014, 01:43 PM
  3. Convert to CSV , extra commas displaying
    By yashu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-24-2013, 08:49 PM
  4. Replies: 8
    Last Post: 08-27-2012, 04:37 PM
  5. extra hours adding money for each extra hour worked FORMULA
    By cynthiamcastro in forum Excel General
    Replies: 3
    Last Post: 06-18-2012, 11:27 AM
  6. [SOLVED] I could NOT resize the axis title but excel allows me to resize gr
    By Iwan Setiyono Ko in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-05-2006, 11:50 PM
  7. [SOLVED] I could NOT resize the axis title but excel allows me to resize gr
    By Iwan Setiyono Ko in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-15-2006, 06:40 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