Results 1 to 6 of 6

apply formula to range of values....

This is a discussion on apply formula to range of values.... within the Excel Questions forums, part of the Question Forums category; I know how to use paste special to perform simple calcs on a range, is there a way to perform ...

  1. #1
    Board Regular Corticus's Avatar
    Join Date
    Apr 2002
    Location
    Sarasota, FL
    Posts
    1,585

    Default

    I know how to use paste special to perform simple calcs on a range,

    is there a way to perform more complex calculations on a range of cells?

    say Range(A1:D10) is populated with values,
    I would like to perform, I don't know, maybe the clean() or substitute() function on the values, and paste the new values over the original ones?

    Thanks, as always,
    Corticus

  2. #2
    MrExcel MVP
    Join Date
    Jun 2002
    Location
    North Canton, OH USA
    Posts
    791

    Default

    You would put the clean() or substitute() function in another column and copy back the values onto the original range.
    Jim

    Excel 2000; Windows 2000

  3. #3
    Board Regular Corticus's Avatar
    Join Date
    Apr 2002
    Location
    Sarasota, FL
    Posts
    1,585

    Default

    Should have thought of that...

    I guess I was hoping for a solution that wouldn't involve making a new range of formulas, but your solution will definately do the job...

    Thanks!
    Corticus

  4. #4
    MrExcel MVP
    Join Date
    Jun 2002
    Location
    North Canton, OH USA
    Posts
    791

    Default

    I don't think so without a VBA procedure.
    Jim

    Excel 2000; Windows 2000

  5. #5
    Board Regular
    Join Date
    Aug 2002
    Posts
    106

    Default

    You could create a macro like this--

    Sub UppercaseAll()
    For Each cell In Selection.Cells
    cell.Value = UCase(cell.Value)
    Next
    End Sub


    This works on ranges so you can just select a bunch of cells and run it on all of them.

    You can do anything to the 'cell.value' data that's appropriate for it's type. Other VB string functions like lcase, left, right are available. Check the help while in the macro editor.
    <font size="-1">Mark Henri</font>

    <font size="-2">Microsoft Tier 1 Excel Support Technician</font>

  6. #6
    Board Regular Corticus's Avatar
    Join Date
    Apr 2002
    Location
    Sarasota, FL
    Posts
    1,585

    Default

    Thanks everybody,

    this will do it!

    Corticus

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com