Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 3 of 3

Thread: Find And Replace Last Cell With Formula

  1. #1
    Join Date
    30th May 2007
    Posts
    33

    Find And Replace Last Cell With Formula

    I would like to create a find and replace macro that looks for the last cell with data in Column C and automatically divides that value by a number. I know how to create a find and replace macro that searches for values, but how to I search for the last cell with data in a specific column? Thanks.

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    18th September 2005
    Location
    Hampshire, UK
    Posts
    1,278

    Re: Find And Replace Last Cell With Formula

    Hi

    Perhaps:

    VB:
    Dim myCell As Range 
    Set myCell = columns(3).find("*",lookin:=xlvalues,searchdirection:=xlprevious) 
    If Not myCell Is Nothing Then 
        myCell.Value = myCell.Value / 2 
    End If 
    
    
    Replace the '2' with whatever number you want to divide the value in the cell by.

    Hope this helps!

    Richard

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    30th May 2007
    Posts
    33

    Re: Find And Replace Last Cell With Formula

    Thanks!

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replies: 9
    Last Post: February 23rd, 2008, 00:07
  2. Replies: 11
    Last Post: April 3rd, 2007, 09:48
  3. Find & Replace or Truncating Cell Contents
    By rebates in forum EXCEL HELP
    Replies: 3
    Last Post: July 26th, 2005, 16:46
  4. Replies: 4
    Last Post: November 29th, 2004, 22:33
  5. Replies: 4
    Last Post: November 1st, 2004, 05:11

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
  •  
porno