+ Reply to Thread
Results 1 to 5 of 5

How to copy last value before 0 of the fixed range

  1. #1
    Registered User
    Join Date
    08-25-2023
    Location
    Thailand
    MS-Off Ver
    2016
    Posts
    8

    Question How to copy last value before 0 of the fixed range

    Hi guys, please help me figure it out MicrosoftTeams-image.png
    as shown in the picture i want to copy last value (in E10-E40 range) except 0 which is 111470 by VBA

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,850

    Re: How to copy last value before 0 of the fixed range

    NOT a VBA solution, but quick and easy:

    =LOOKUP(2,1/(E10:E40<>0),E10:E40)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-25-2023
    Location
    Thailand
    MS-Off Ver
    2016
    Posts
    8

    Re: How to copy last value before 0 of the fixed range

    I have to use VBA cuz i have to download this file from browser by power automate then i'll run macro to copy this value to another excel

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,850

    Re: How to copy last value before 0 of the fixed range

    That makes no sense to me - if you are downloading the data into Excel, then yo ucan use a formula!

    Anyway, it's up to you.

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

    Arrow Re: How to copy last value before 0 of the fixed range


    Quote Originally Posted by ineedhelppppp111 View Post
    Hi guys, please help me figure it out
    Hi,

    as any of our Excel versions works with a picture then you must at least elaborate each 'to do' step with nothin' to guess …

+ 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] VBA to copy data between two sheets with fixed range
    By kumar79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2023, 10:33 AM
  2. [SOLVED] Consolidate/Copy Data from Multiple Sheets from a Fixed Range into a single sheet
    By Rompurr in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 01-29-2020, 10:53 PM
  3. Trying to copy fixed row of cells, paste to next empty line, and clear fixed line.
    By oh_stanley in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-24-2014, 07:44 PM
  4. Copy a fixed range of cells from a filtered Table
    By jsuarez199 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-27-2013, 06:53 AM
  5. excel 2007 macro need to have variable range of rows rather than fixed range
    By JW1028 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 02:45 PM
  6. Change range of cells within VBA macro and copy and paste to fixed cell range
    By Mannyny in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2012, 11:51 AM
  7. Copy paste macro without fixed range
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-30-2012, 02:26 AM

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