Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Everyone -
I've been gone for a while, but back now... :) I have a question that I've been going crazy. I'm working on our Payroll Sheet for work, and the situation is the following: On the sheet DATA, I've put together VLookup table with all the employees and their specific data on budget percentages on hours worked. For example, one row would include Sally Smith's name, dept., an amount equal to 50% of hours worked in Program A, 50% of hours worked in Program B, etc. With some great help, I've come up with the following code: Private Sub CommandButton3_Click() If Sheets("DATA").Range("A1").Value = 4 Then Sheets("PAYROLL SHEET").Range("A40:AL40").Clear Sheets("DATA").Range("B6:V6").SpecialCells(xlCellT ypeVisible).Copy Destination:=Sheets("payroll sheet").Range("B40") Sheets("PAYROLL SHEET").Range("A41:AL41").Clear Sheets("DATA").Range("H76:AR76").SpecialCells(xlCe llTypeVisible).Copy Destination:=Sheets("payroll sheet").Range("B41") End If End Sub The code seems to copy the data from the table fine, but because I have some formulas in the table instead of just values, I'm getting #REF entries in the copied data. My question is: is there a way to modify my code so that the formula results (resulting values), in the tables, gets copies as to get rid of the #REF errors? Maybe using a PasteSpecial method in the code? Thanks for your help. Frank |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VLookUp - Does the VLookUp return the exact information? | Excel Worksheet Functions | |||
using a vlookup to enter text into rows beneath the vlookup cell | Excel Programming | |||
Vlookup in vlookup - taking the result as array name | Excel Worksheet Functions | |||
Which is faster: VLOOKUP-worksheet or VB-array VLOOKUP? | Excel Programming | |||
Vlookup info being used without vlookup table attached? | Excel Worksheet Functions |