I use excel 2007 and have a spreadsheet which has 350,000 rows of data.
The data consists of many ranges.
Each range has a cell containing a formula. These cells are in the same column but refer to different cells on another sheet.
I want to put the formula on the row above each range.
If I copy/paste I just get the result of the formula. Is it possible to to have a formula which copy/pastes another formula???
Big thanks.
Colwyn.
Using 2003
Sheet1: Current macro calculates a range of cells from a fixed upper-left
range cells F5 to G200.: (Note that Sheet1 is a Pivot-table already using
Auto filter.)
Sheets("Pivot Table").Range(Cells(5, "F").Address, Cells _
(Rows.Count, "G").End(xlUp).Address).Copy
(followed by
Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks:=True, Transpose:=False
I would prefer that the copy command would evaluate only the cells whose
formula calculates a value. By this I mean: Many of the cells in the F5 to
G200 range do not have a calculated value. Assuming that only 5 rows have
values, the copy command will copy the calculated range F5 to G200, meaning
that 195 two-column cell combinations will be pasted to the receiving range
wasting space on Sheet2.
My macros then copy another range from Sheet3 beginning at row 201. (Again,
there are 195 essentially wasted rows between the cells pasted from Sheet1)
I have attempted to Copy using VisibleCells and/or Paste-special SkipBlanks
= True - yet I still get the 195 "Wasted-space" cells.
It seems that there are three solutions:
One is a smarter way to copy only the cells that the
underlying formula calculates a value.
-or-
Another, is to Paste only those cells from Sheet1 which
have values (text or numeric)
-or-
Develope a routine to delete the empty rows on Sheet2.
Which of the three is the smartest/most efficient?
I need help with coding the syntax in VBA.
Thanks, Dennis
I have some data i need to cpy and paste but can't seem to find a formula. In column B there are #s and then word Centrocusto. What im trying to do in column A is copy the names next to the word Centrocusto. im using D9& " "E9 then copy and paste the data.
The problem is the data i copy each time changes and the word Centrocusto shows up every other 5-15 times. I have about 200,000 data. I tried using if, or index, but kept getting stuck. Ive enlcosed what Im doing, any help would be a major dent into what I am doing. THank you soo much!!
Hi All
i have set up a basic COUNTIF formular:
=COUNTIF('Jan CM'!B:B,Sheet1!A283)
Note: Jan CM relates to sheet 2.
I have copied this formular down through 250 rows. This works perfect and the ref A283 changes as i go.
My next challenge is to copy all those formular left to right. BUT i need to freeze the column refs A283...A284...A285 etc
I am aware i can do this through using the dollar sign but is there a way to multi update the formulars i have copied down?
The only way i can find to achieve the above is to go down every indivdual line and insert the $ sign. Before i attempt to copy acoss my worksheet
all help appreciated
Hey all,
I have a macro that inserts a formula on the first row and then copies it down. The problem is the row count is variable but I know it won't exceed 5000 so I just copy it down 5000. For the blank rows I get the ugly #NAME, #VALUE, etc errors.
I know there are ways to supress those error messages, but how about a way so that the macro checks to see how many rows are populated so it doesn't copy down on the blank rows. I figure someone would have hit on this problem before.
I'm trying to figure a formula or possibly a macro that will allow me to do the following:
Enter data into cell B1 on Sheet 1 and populate cell C1 on Sheet 2. The tricky part is I need the formula/macro to let me continue to enter data into cell B1 (sheet 1) while it populates each cell after C1 (sheet 2) in the same column with new data.
Any help would be appreciated.
Why would a formula copy down the whole column but NOT provide the correct
answers within the cells at one computer and at another computer would work?
I have created a timesheet in Excel, with meal breaks, end times and total hours worked for a two week period. The formula =SUM(INT(X10)+Z10) calculates correctely in day 1 of week 1 and through the first week. When I copy the formula to week 2, it does not calculate. I have even entered the formula again, but it does not work. I even tried putting it on a new sheet. I also tried doing a paste special. I need help to complete this timesheet.
Hi,
I have a spreadsheet with some formulas that work great in calculating the hours between two date/time entries and another which does the same but in number of days rather than hours. They use the networkdays function.
But now that I've added a userform would it be better to copy the formulas using the userform update routine or rewrite into vba?
Formula 1: =VLOOKUP(NETWORKDAYS(A2,F2)*9-((A2-(INT(A2)+(8.5/24)))*24)-(((INT(F2)+(17.5/24)-F2))*24),{0,"A";4,"B";8,"C";45,"D"},2,1)
Formula 2: =LOOKUP(NETWORKDAYS(F2,G2),{1,2,3,4,5,6,7},{"A","B","C","D","E","F","G"})
They both apply a code - A to D or A to G depedning on which one it is.
Is it possible to calculate the time between two dates, within working hours, and do this?
OR if I can't, how do I copy the formula from a previous entry on the sheet within the confines of the userform???
Regards,
Pat
I copy and paste formulas all the time, I think I have changed a setting because everytime I copy and paste or filter down my formula's only equal the first formula? can somebody help me?
eg:
NO
Amount
Total
1
456
457
2
8
457
3
34
457
4
6
457