Sheet1 has all sorts of look up tables and formulas. I want to make a macro that will make Sheet2 only have the numbers resulting form the stuff on Sheet1. Make sense?
Thanks very much for the help,
Ken
Sheet1 has all sorts of look up tables and formulas. I want to make a macro that will make Sheet2 only have the numbers resulting form the stuff on Sheet1. Make sense?
Thanks very much for the help,
Ken
Ken,
Is this what you wanted?
Option Explicit
Sub PasteSpecial()
Sheets(1).Activate
Cells.Select
Selection.Copy
Sheets("Sheet2").Select
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
End Sub
--
Ken Hudson
"sungen99" wrote:
>
> Sheet1 has all sorts of look up tables and formulas. I want to make a
> macro that will make Sheet2 only have the numbers resulting form the
> stuff on Sheet1. Make sense?
>
> Thanks very much for the help,
> Ken
>
>
> --
> sungen99
> ------------------------------------------------------------------------
> sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
> View this thread: http://www.excelforum.com/showthread...hreadid=400465
>
>
This is my code. It is saving the data correctly but its saving the formulas and all i want is the "value". How would I change this to only place the values?
Better yet I could remove this extra file all together if i know how it just place the data right onto an email and send it. that would be the best thing.
thank you!
Ken
Application.DisplayAlerts = False
Dim wb As Workbook
Sheets(Array("Recap")).Copy
Set wb = ActiveWorkbook
wb.SaveAs Filename:="C:\Recap-Ver1.1.xls"
wb.Close False
Application.DisplayAlerts = True
Last edited by sungen99; 01-25-2006 at 10:57 AM.
Application.DisplayAlerts = False
Dim wb As Workbook
Sheets(Array("Recap")).Copy
Activesheet.UsedRange.Formula = ActiveSheet.Usedrange.Values
Set wb = ActiveWorkbook
wb.SaveAs Filename:="C:\Recap-Ver1.1.xls"
wb.Close False
Application.DisplayAlerts = True
--
Regards,
Tom Ogilvy
"sungen99" <[email protected]> wrote in
message news:[email protected]...
>
> This is my code. It is saving the data correctly but its saving the
> formulas and all i want is the "value". How would I change this to
> only place the values?
>
> thank you!
> Ken
>
>
>
>
> Application.DisplayAlerts = False
>
> Dim wb As Workbook
> Sheets(Array("Recap")).Copy
> Set wb = ActiveWorkbook
> wb.SaveAs Filename:="C:\Recap-Ver1.1.xls"
> wb.Close False
>
> Application.DisplayAlerts = True
>
>
> --
> sungen99
> ------------------------------------------------------------------------
> sungen99's Profile:
http://www.excelforum.com/member.php...fo&userid=9144
> View this thread: http://www.excelforum.com/showthread...hreadid=400465
>
Thank you Tom!
Substitute value for values:
Activesheet.UsedRange.Formula = ActiveSheet.Usedrange.Value
Verses:
Activesheet.UsedRange.Formula = ActiveSheet.Usedrange.Values
Regards--Lonnie M.
Tom Ogilvy wrote:
> Application.DisplayAlerts = False
>
> Dim wb As Workbook
> Sheets(Array("Recap")).Copy
> Activesheet.UsedRange.Formula = ActiveSheet.Usedrange.Values
> Set wb = ActiveWorkbook
> wb.SaveAs Filename:="C:\Recap-Ver1.1.xls"
> wb.Close False
>
> Application.DisplayAlerts = True
>
>
> --
> Regards,
> Tom Ogilvy
>
> "sungen99" <[email protected]> wrote in
> message news:[email protected]...
> >
> > This is my code. It is saving the data correctly but its saving the
> > formulas and all i want is the "value". How would I change this to
> > only place the values?
> >
> > thank you!
> > Ken
> >
> >
> >
> >
> > Application.DisplayAlerts = False
> >
> > Dim wb As Workbook
> > Sheets(Array("Recap")).Copy
> > Set wb = ActiveWorkbook
> > wb.SaveAs Filename:="C:\Recap-Ver1.1.xls"
> > wb.Close False
> >
> > Application.DisplayAlerts = True
> >
> >
> > --
> > sungen99
> > ------------------------------------------------------------------------
> > sungen99's Profile:
> http://www.excelforum.com/member.php...fo&userid=9144
> > View this thread: http://www.excelforum.com/showthread...hreadid=400465
> >
My typo - thanks.
--
Regards,
Tom Ogilvy
"Lonnie M." <[email protected]> wrote in message
news:[email protected]...
> Substitute value for values:
> Activesheet.UsedRange.Formula = ActiveSheet.Usedrange.Value
>
> Verses:
> Activesheet.UsedRange.Formula = ActiveSheet.Usedrange.Values
>
> Regards--Lonnie M.
>
> Tom Ogilvy wrote:
> > Application.DisplayAlerts = False
> >
> > Dim wb As Workbook
> > Sheets(Array("Recap")).Copy
> > Activesheet.UsedRange.Formula = ActiveSheet.Usedrange.Values
> > Set wb = ActiveWorkbook
> > wb.SaveAs Filename:="C:\Recap-Ver1.1.xls"
> > wb.Close False
> >
> > Application.DisplayAlerts = True
> >
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> > "sungen99" <[email protected]> wrote
in
> > message news:[email protected]...
> > >
> > > This is my code. It is saving the data correctly but its saving the
> > > formulas and all i want is the "value". How would I change this to
> > > only place the values?
> > >
> > > thank you!
> > > Ken
> > >
> > >
> > >
> > >
> > > Application.DisplayAlerts = False
> > >
> > > Dim wb As Workbook
> > > Sheets(Array("Recap")).Copy
> > > Set wb = ActiveWorkbook
> > > wb.SaveAs Filename:="C:\Recap-Ver1.1.xls"
> > > wb.Close False
> > >
> > > Application.DisplayAlerts = True
> > >
> > >
> > > --
> > > sungen99
> >
> ------------------------------------------------------------------------
> > > sungen99's Profile:
> > http://www.excelforum.com/member.php...fo&userid=9144
> > > View this thread:
http://www.excelforum.com/showthread...hreadid=400465
> > >
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks