Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to paste special value only VLOOKUP formulas
I need a macro that will find all the cells in a worksheet that have a
VLOOKUP formula and do a copy, paste special values on those cells. There are other formulas (SUM, IF, etc.) in the workbook, but I need to leave those intact. Can anyone help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to paste special value only VLOOKUP formulas
Sub AB()
Set rng = Cells.Find(What:="Vlookup", _ After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then Do rng.Formula = rng.Value Set rng = Cells.FindNext(rng) Loop Until rng Is Nothing End If End Sub -- Regards, Tom Ogilvy "jeremy nickels" wrote in message ... I need a macro that will find all the cells in a worksheet that have a VLOOKUP formula and do a copy, paste special values on those cells. There are other formulas (SUM, IF, etc.) in the workbook, but I need to leave those intact. Can anyone help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to paste special value only VLOOKUP formulas
Thanks Tom, that works great!
"Tom Ogilvy" wrote: Sub AB() Set rng = Cells.Find(What:="Vlookup", _ After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then Do rng.Formula = rng.Value Set rng = Cells.FindNext(rng) Loop Until rng Is Nothing End If End Sub -- Regards, Tom Ogilvy "jeremy nickels" wrote in message ... I need a macro that will find all the cells in a worksheet that have a VLOOKUP formula and do a copy, paste special values on those cells. There are other formulas (SUM, IF, etc.) in the workbook, but I need to leave those intact. Can anyone help? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to paste special value only VLOOKUP formulas
Hi,
This was very useful for me as well. Could you please also help with extending this to a scenario where same function needs to be performed on all worksheet in the workbook? Thanks SA "jeremy nickels" wrote: Thanks Tom, that works great! "Tom Ogilvy" wrote: Sub AB() Set rng = Cells.Find(What:="Vlookup", _ After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then Do rng.Formula = rng.Value Set rng = Cells.FindNext(rng) Loop Until rng Is Nothing End If End Sub -- Regards, Tom Ogilvy "jeremy nickels" wrote in message ... I need a macro that will find all the cells in a worksheet that have a VLOOKUP formula and do a copy, paste special values on those cells. There are other formulas (SUM, IF, etc.) in the workbook, but I need to leave those intact. Can anyone help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Paste special for formulas | Excel Discussion (Misc queries) | |||
Paste Special - Formulas - Add | Excel Worksheet Functions | |||
paste special - formulas | Excel Worksheet Functions | |||
Paste Special - All but formulas | Excel Worksheet Functions | |||
Dynamic Copy/Paste Special Formulas/Paste Special Values | Excel Programming |