ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Viewing only the #’s (https://www.excelbanter.com/excel-programming/338736-viewing-only-%92s.html)

sungen99[_26_]

Viewing only the #’s
 

Sheet1 has all sorts of look up tables and formulas. I want to make
macro that will make Sheet2 only have the numbers resulting form th
stuff on Sheet1. Make sense?

Thanks very much for the help,
Ke

--
sungen9
-----------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...nfo&userid=914
View this thread: http://www.excelforum.com/showthread.php?threadid=40046


Ken Hudson

Viewing only the #s
 
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



sungen99[_38_]

Viewing only the #’s
 

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


Tom Ogilvy

Viewing only the #'s
 
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" wrote in
message ...

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




sungen99[_39_]

Viewing only the #’s
 

Thank you Tom!


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=400465


Lonnie M.

Viewing only the #'s
 
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" wrote in
message ...

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



Tom Ogilvy

Viewing only the #'s
 
My typo - thanks.

--
Regards,
Tom Ogilvy


"Lonnie M." wrote in message
oups.com...
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" wrote

in
message ...

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






All times are GMT +1. The time now is 11:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com