Excel 2007 :: Alternative To Convert Formulas To Values That Keeps Hyperlinks Active?
Oct 16, 2013
I'm using Excel 2007 and I'm a VBA novice.
Problem: The macro will be assigned to a command button and will be used by laypersons when they finish filling in data on a worksheet in Workbook 1. The sheet contains maybe 30 columns and 50 rows with a mix of fixed values and values generated by Vlookup and Indirect formulas. I need to copy the sheet from Workbook 1 to Workbook 2. Workbook 2 will be for archival purposes so I want to convert all formulas to fixed values. The catch is dealing with some cells that contain hyperlinks to PDF files...
Current Solution: I currently do this with a macro that moves/copies the sheet from Workbook 1 to Workbook 2, it then selects all cells in the new sheet in Workbook 2, copies all cells, then pastes-special "as values" to the exact same cell locations. This works great for me since the cell formatting and data in the sheet are VERY irregular and I have merged cells all over the place. This method keeps the exact formatting I need maintain:
ActiveSheet.Copy After:=Workbooks("Workbook2.xlsx").Sheets(1)
ActiveSheet.Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
The problem is that a few of the cells have hyperlinks with "friendly names" and I lose the hyperlinks when I convert to values. The hyperlinks are not inserted directly, they are created by a formula, =HYPERLINK("N:Filepath"&C16&".PDF", "Click_For_PDF"), and the row and column that contains the hyper link will vary for each sheet I want to migrate from Workbook 1 to Workbook 2 using this macro. I want to keep the hyperlink active with the clickable friendly name in Workbook 2.
Possible Solution: I'm open to all types of solutions, but is there a way to essentially use my existing macro but AFTER converting to values with paste-special, go back to the original sheet in Workbook 1 that still contains formulas (or maybe a temporary duplicate sheet I migrate to Workbook 2?), search for all cells with a "value" of "Click_For_PDF", copy ONLY those cells and paste (normal) into the corresponding cell locations in the sheet in Workbook 2 that now contains fixed values? ALL of my hyperlinks have the friendly name "Click_For_PDF" so it should be an easy way to identify the hyperlink cells. The cell location of the hyperlink copied in Workbook 1 needs to carry over to Workbook 2 and I said before, the row and col vary with every sheet I want to archive with this macro.
View 9 Replies
ADVERTISEMENT
Feb 5, 2014
I've got a main workbook (excel 2007) with a main spreadsheet where i group all the information (text and values) about brands and models linked to 10 workbooks (brands) with several spreadsheets (one spreadsheet=one model).
On the main spreadsheet I've got 16 lines for each model which they have the follow formulas, wich are linked to other workbook / spreadsheet (Mar/Gato)
1)
IF(ISERROR(VLOOKUP(V844;[Mar.xlsx]Gato!$A$3:$CE$78;3;FALSE));"";VLOOKUP(V844;[Mar.xlsx]Gato!$A$3:$CE$78;3;FALSE))
and will return text values
2)
IF(ISERROR(VLOOKUP(V844;[Mar.xlsx]Gato!$A$3:$CE$78;82;FALSE));"";VLOOKUP(V844;[Mar.xlsx]G!$A$3:$CE$78;82;FALSE))
And will return number values
3)
IF(M844<>"";HLOOKUP($V$3;[Mar.xlsx]Gato!$A$2:$CE$78;2;FALSE);"")
And will return number values. The return value (;2 goes from 2 to 16.
This process repeats to all the 10 workbooks e and 250 spreadsheets
4) Table Array of the model spreadsheet
With regard to formula 1) and 2)
The problem is that the table array (on the model spreadsheet) could have diferent dimensions (becouse the launch year of the model) like this:
A$3:$CE$78 (2009 - Launch year)
A$3:$BR$78 (2010 - Launch year)
A$3:$BE$78 (2011 - Launch year)
A$3:$AR$78 (2012 - Launch year)
A$3:$AE$78 (2013 - Launch year)
And the return column (value) for formula 1) is always ;3;
And the return column (value) for formula 2) are like this:
;82; (2009 - Launch year)
;69; (2010 - Launch year)
;56; (2011 - Launch year)
;43; (2012 - Launch year)
;30; (2013 - Launch year)
;17; (2014 - Launch year)
The difference between above values is 13, it corresponds 12 months and the total column (12+1)
For the formula 3) the table array its the same, the only difference is instead of starting A$3, starts in A$2
5) The update of the formulas 1) 2) 3) for 2014
I'm doing this manually... The formulas are updated like this,for 2013, I've got table array A$3:$AE$78 and the return value (;17, then for 2014 i will have a table array A$3:$AR$78 and the return value will be (;30, and so on
5) Change the network drive
For other reasons I've to change my files to another network drive, something like this:
Q:KPI2014Main File
6) Main Goal
I was thinking using Excel's regular Find and Replace feature to change:
- The network drive designation
- the table array area
- The return value
But I don't know if this process ( Find and Replace) is safe and clean. I'm doing this manually and I've got on the main worbook/sheet 4000 lines with 3 formulas its 12000 operations!I'm on the 350 line....!
The main goal is to update the all formulas (links) to "brand" workbooks and inside "model" spreadsheets automatically with a macro.
View 2 Replies
View Related
Nov 8, 2011
I am running Microsoft Excel 2007 on Windows XP. Right now, I have the standard macro set up that will replace formulas with their values. It's the standard macro that does this for the entire sheet:
Code:
Sub All_Cells_In_Active_WorkSheet_1()
With ActiveSheet.UsedRange
.Cells.Copy
.Cells.PasteSpecial xlPasteValues
.Cells(1).Select
End With
Application.CutCopyMode = False
End Sub
However, with this being a daily task, the issue is that this wipes the formulas out for future dates, which is obviously problematic. To be more specific:
I have one tab (HISTORICAL) with over 200 rows with each business day this year. Columns B through H will pull data from two other tabs (ENTRY1 and ENTRY2) that is entered daily, using a formula that tells Excel to only pull the data for the current date:
Code:
=IF(A224=ENTRY1!B1,ENTRY1!B2,0)
So each day, someone will open this sheet and input their data on the ENTRY1 and ENTRY2 tabs. These numbers will auto populate over to the HISTORICAL tab for that specific day.
Also on each day, someone else will open the sheet and go to the HISTORICAL tab and run the macro that converts the formulas on that sheet to the value.
I want to be able to run the macro only for the row with the current date (and any date before will be fine since those will already be converted anyway).
So, taking today for example, when I run the macro, I want it to convert the data only in the 11/8/2011 and previous rows, but NOT for the 11/9/2011 and later rows.
View 3 Replies
View Related
Feb 13, 2013
I have a some data where I need to sum some data based on date range, and dept id's. But the dept ids are parts of various groups. For ex, one group covers about 300+ dept id's. Some of them have ranges (e.g. dept 1000 - 1050) but for whatever reason some dept id's that belong to other groups sometimes fall into the same ranges.
My first hope was one big range, but the overlap issue nixed that. As I mentioned there are some ranges so maybe 100 of them could be grouped into a range but I'd still have 200+ independent dept id's.
I read for 2003 the max criteria for sumproduct is 30 and for 2007+ it's 255. So maybe 2007 might cut it but this doesn't seem like the right way.
Btw, I'm doing this in VBA but I mention sumproduct because I've used it a few times within code via evaluate. Otherwise do I just have a massive string in vba (If deptid = #### or deptid = #### or deptid = #### etc)?
Again, it seems like there should be a better way. I thought about making a master list of all the dept's and sumproduct each one individually and then sum from the ones that fall under group but even then I have to identify the deptids I need for a particular group.
View 1 Replies
View Related
Aug 9, 2012
I am getting a "Run time error 5", "invalid procedure call or arguement" when I run a macro on a PC other tha the one on which it was created.
In this case both PC's are running on the version 2007 of Excel.
This is the highlighted statement when the macro fails
Code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"SOCX25!R1C1:R" & Lr & "C23", Version:=xlPivotTableVersion14).CreatePivotTable _
TableDestination:="SOCX25!R7C25", TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion14
View 4 Replies
View Related
Jul 15, 2014
I have Excel 2007, and I have column 1 with a thousand entries "HC 14-0001" all the way down to "HC 14-1000". I have on my hard drive 1000 foldiers named the exact same "HC 14-0001 to HC 14-1000". I want to create a Hyperlink from each item in that column to its corrisponding folder on the hard drive. I can easily create the Hyperlink, but I want to find someway to copy them. I can create the first two rows... HC 14-0001 and HC 14-0002 and create good Hyperlinks to the folders, but when I highlight them and drag them down, the excel spreedsheet is updated all the way to HC 14-1000, but the Hyperlinks do not change.
How can I get the Hyperlinks to change? I don't want to spend the next week creating Hyperlinks for a 1000 entries on this spread sheet, and I have 5 other spreadsheets exactly the same.
View 13 Replies
View Related
Oct 17, 2013
I received a USB drive from a client with an Excel spreadsheet with hyperlinks to PDF's (not sure of the version it was originally created in but my version is 2007). The PDF's are in another folder on the USB drive.
The cells with the hyperlinks have a formula to hidden cells [i.e. =HYPERLINK(C17,B17)] - in column B is the name of the hyperlink and in column C looks to be the file trial to the PDF (please see attached picture).
When I select the link, I get an Alert Box stating, "Cannot open the specified file." How I can get these links to work?
Excel Hyperlinks.png
View 1 Replies
View Related
Jan 10, 2013
I am running Excel 2007 on Windows Vista Business 32 bit. Recently I have noticed that if I enter a formula into an empty, unsused cell, it is recognized as a formula. If I modify that formula, it is then recognized as text and does not work as a formula. The only way I can get the cell to recognize a formula is to delete the cell and start over. This same scenario does not occur on previously stored workbooks. I have checked all of the flags that I know about, including the Options function.
View 3 Replies
View Related
Sep 12, 2007
I have a product mix values as below. I want to convert the values into the % of total product mix.
CREATE TABLES LIKE BELOW?
----G---- ----H---- ----I---- --J--
4 Product A Product B Product C Total
5 32 73 125 230
6 14% 32% 54% 100%
View 9 Replies
View Related
Jul 15, 2014
How can I convert all cell values in active range to text format without losing the actual value.
For Ex.
0123 will remain 0123
07/12/2014 will remain 07/1/2014
3453 will remain 3453
regardless of there previous format. Currently I am doing this manually for every column before creating a load file for SQL database.
View 7 Replies
View Related
Feb 11, 2009
I need to copy the Selected Sheet (Sheet name will be different each month) on a spreadsheet and paste the copy to the left of the selected Sheet. Then I need to copy and paste values the entire sheet of the sheet that the copy was made from (the one on the right). I am very new to macros, and I tried recording and manually editing the macro with no success. The number of sheets will be different always as I will be adding this to different workbooks and also because new sheets may be added to any workbook at any time. I attached my code that I came up with, as I am not familiar with code enought to "[code]" my code.
View 3 Replies
View Related
Sep 26, 2012
I am copying the value in a cell to another sheet's cell. I want to convert the formulas on the second sheet to reflect their value. I do this all the time within cells by using Past Special and Values however it doesn't give me that option within the Text Box
View 2 Replies
View Related
Oct 19, 2006
I am trying to find a way to search for specific cell formulas (not the values they produce). For example, how could I search an Excel tab for a cell containing "= sum()" ? I want to ignore all other formulas and values. I then want to replace this formula only with its value.
View 4 Replies
View Related
Dec 3, 2013
I want to convert multiple sections that contains formulas to values. Usually i did this by coping range of cells, and paste as Values. But now i have multilple sections and excel doesn't allowe me to copy multiple sections. (i can not use clipboard, because there are more than 2.5 k rows)
View 7 Replies
View Related
May 29, 2008
I want to create a Macro to convert the formula results from a filtered data range to values. I thought to use a simple code to do the copy - paste to value
Sub QuickSaveValue()
Dim r As Range, c As Range
Set r = Selection
For Each c In r.SpecialCells(xlCellTypeFormulas)
c.Copy
c.PasteSpecial xlPasteValues
Next c
Application.CutCopyMode = False
End Sub
But is not good because the range is much to large and i need just a filtered part to be changed and i tried like this:
Sub QuickSaveTV()................
View 4 Replies
View Related
May 10, 2013
I am trying to create a VBA code that will automatically highlight the row of an Excel table (2007) of the active cell. So far I have this:
Code:
If Not Intersect(ActiveCell, Range("Table_Name")) Is Nothing Then
Range("A" & Target.Row & ":EJ" & Target.Row).Interior.Color = 10092543
End If
Where the columns A and EJ represent the size of the table. But I would like to automate the column choices so that if the table has columns added or removed, the code still works. Is there a way to just reference a row of a table?
View 1 Replies
View Related
May 16, 2012
I am creating a Macro to convert formulas to values on a Datasheet after each entry from a form (worksheet) is carried over. Since each entry will go on a separate row I created formulas to give the new datas location. I just can't get the syntax correct for it to run.
Sub Convert_Formulas_to_Values()
Range("Reviews!$B$202").Value: Range("Reviews!$AF$202").Value.Select
Selection.Copy[code]....
View 4 Replies
View Related
Nov 7, 2008
I have big Access file .mdb. I need to work with the file in Excel.
The Excel read the file and I tryed to save the file as .xlsx
I receive a message saying only 64k rows will be saved.
How can I translate the file to Excel 2007?
View 1 Replies
View Related
Sep 6, 2007
I'm actually having difficulty with the sumproduct function, I'm trying to count items based on multiple criteria (and yes I have looked under that). I'm using a very helpful formula that I grabbed from this site. =SUMPRODUCT(1*(base!$B$1:$B$19465=locations!B$1),1*(base!$A$1:$A$19465=locations!$A6))
The problem that I have is that this doesn't work if I replace $B$1:$B$19465 with $B:$B. now as the number of rows on the base sheet may change, this means I need to change the formula each time I change the data on the base sheet which is somewhat ridiculous. I've been playing around with indirect trying to reference the last cell in a range, but I don't seem to be getting anywhere with that.
View 6 Replies
View Related
Jul 22, 2014
I have an excel file with 2 sheets. Sheet 1 has a column that contains formulas (ie (18299*11151)/20067 ) Those numbers are IDs referencing questions stored in Sheet 2. What I would like to do is find a way to look up those questions and place them into the formula instead of the ID numbers.
View 6 Replies
View Related
Mar 14, 2012
Background info: I have developed a Hired Equipment Time Sheet with numerous formulas to auto populate and calculate various cells to minimize user impute requirements.
Can cell formulas be toggled on and off to allow manual impute of data rather than the formula automatically populating information in the cell if the need arises? If so, can this be done via a drop down pick? Also can or will the formula still be protected?
View 2 Replies
View Related
Mar 24, 2012
I am running Excel 2007.
I have set up a table and for ease of explanantion Column C has a formulas in it to add together the values found in Column A and B.
EG C3 foumula = "=sum(A3+B3)"
Now in cols d & e I have manually entered figures and in colum F I want to add up those figures so F3 should read "=sum(D3+E3)"
In the past I have always been able to just copy the cell C3 and paste it into F3 and the formula would automatically copy and offset the various cells to the correct cells for the new posiitoning.
However, for some reason when I copy the cell, it now pastes the value only into the pasted cell and does not copy the formula, if I click on paste special to try to just copy the formula I now get a pop up asking me if I want to paste as Unicode Text or Text.
I have no recollection of changing any settings.
View 3 Replies
View Related
Feb 7, 2012
I want to convert Hex to Binary. I want the Binary in 8 different cells.The hex input would be lets say A1 I would want to convert that to eight different cells Bit7 G10, Bit6 G12, Bit5 G14, Bit4 G16, Bit3 E10, Bit2 E12, Bit1 E14 and Bit0 E16.
Then I want another Hex input on A2 and convert that to eight diferent cells.
Bit7 K10, Bit6 K12, Bit5 K14, Bit4 K16, Bit3 I10, Bit2 I12, Bit1 I14 and Bit0 I16.
How would I do This?
View 9 Replies
View Related
Jul 3, 2012
Using Microsoft Excel 2007 and all of a sudden, my spreadsheets are not automatically calculating the formulas. It does not matter if I have other workbooks open or not. I still get the problem. It does not happen 100% of the time to make it even more complicated.
- Calulation set to auto in Excel Options.
- No VBA functions being used. I can the worksheet summing 1 + 1 and get the error periodically. It does not have to do with the spreadsheet being too complicated.
- Even if I can hit Ctrl-Alt-F9 to force the formulas to calculate, it won't work.
View 2 Replies
View Related
Jul 8, 2012
Suddenly realized that I can't paste formulas. When I copy/paste, it only pastes as values. When I copy and Paste Special, the only option is "Unicode Text". No option for formulas, formatting, or anything else. Excel 2007.
View 4 Replies
View Related
Feb 27, 2013
Is it possible to conditional format cells with formulas in Excel 2007. It used to be possible in Excel 2003 but I'm struggling to find this in the new version.
View 6 Replies
View Related
May 17, 2013
I have created a form in Excel 2007. I need converting the form to Word or PDF.
Have tried:
Simple copy paste - obviously unsuccessful.
Downloaded Adobe Pro X1 but free version doesn't allow me to convert.
Downloaded Total Excel Converter doesn't give me what I'm looking for.
View 7 Replies
View Related
May 22, 2012
I have a column (A) with numbers like
0
15
30
45
100
115
130
145
200
215
230
245
300
315
330
345
400 and so on up tp 2345
I need to change this into time as;
00:00
00:15
00:30
00:45
01:00
01:15
01:30
01:45
02:00
and so on up to 23:45
Is there any formula which can do this?
View 4 Replies
View Related
Sep 6, 2013
I have a lot of formulas that I don't want to be changed or deleted, but I still want the user to be able to enter data into the cells.
If I use "Protect sheet" I can't select a cell or enter something into it. I sure there is some setting I have to change, but I'm not sure what to select.
I'm using excel 2007
View 3 Replies
View Related
Nov 30, 2011
I am working with Excel 2007 and have an occurring problem when I resize a table. Some of my forumlas copy to the new rows, while others do not. How can I ensure all my formulas copy to the newly created rows. Also sometime when they do copy to the new row an #REF! in the formula where the range should be , yet if I copy and paste the formula from the above row it works.
Here is an example of one of my Formulas Note Sheet1!$J$3:$J$500 is also a table Called Data
=SUMPRODUCT((Sheet1!$J$3:$J$500)*(Sheet1!$A$3:$A$500=$A14&DP$4)) and this is how it is inserted into a new row
=SUMPRODUCT((Sheet1!#REF!)*(Sheet1!#REF!=$A15&DP$4))
View 1 Replies
View Related