View Single Post
 
Old 11-28-2016, 09:26 AM
rsrasc rsrasc is offline Windows 10 Office 2013
Competent Performer
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default Help Needed with Macro to Change Formulas to Text Using Ranges

Hi all,

The attached file has various tabs. The tabs are:

Master
025
050
056
100

Under tab 025, 050, 056, and 100, from cells "A4:A9", I have a formula in there.
I need a macro or code that will change the formula to text value.

I tried two different options/codes but they don't work. See below.

Code:
Sub Master_File()
 
Workbooks("2017-SSE-Budget-ExcelSummary1.xlsm").Sheets("Master").Range("A4:A100").Value = Workbooks("2017-SSE-Budget-ExcelSummary1.xlsm").Sheets("025").Range("A4:A100").Text
Workbooks("2017-SSE-Budget-ExcelSummary1.xlsm").Sheets("Master").Range("A4:A100").Value = Workbooks("2017-SSE-Budget-ExcelSummary1.xlsm").Sheets("050").Range("A4:A100").Text
Workbooks("2017-SSE-Budget-ExcelSummary1.xlsm").Sheets("Master").Range("A4:A100").Value = Workbooks("2017-SSE-Budget-ExcelSummary1.xlsm").Sheets("056").Range("A4:A100").Text
Workbooks("2017-SSE-Budget-ExcelSummary1.xlsm").Sheets("Master").Range("A4:A100").Value = Workbooks("2017-SSE-Budget-ExcelSummary1.xlsm").Sheets("100").Range("A4:A100").Text
End Sub
 
 
Sub Master_File1()
 
Worksheets("025").Range("A4:A100").Value = Worksheets("025").Range("A4:A100").Text
Worksheets("050").Range("A4:A100").Value = Worksheets("050").Range("A4:A100").Text
Worksheets("056").Range("A4:A100").Value = Worksheets("056").Range("A4:A100").Text
Worksheets("100").Range("A4:A100").Value = Worksheets("100").Range("A4:A100").Text
 
End Sub

A similar code was provided to me before by Macropod, and it was to copy from one cell (with a formula) to another cell (only text values), which I was able to use it successfully.

I'm sure I'm doing something wrong with this code.


I'm attaching a copy of the file for your review, or in case is needed.


Hope you can help me.

Thank you in advance for your support!

Cheers!
Attached Files
File Type: xlsm 2017-SSE-Budget-ExcelSummary1.xlsm (171.0 KB, 10 views)
Reply With Quote