Here is what I came up with. The macro will color the text in the cell white or black depending...
Please try this as well. Sub Save2PDF() Dim Fname As String Fname = InputBox("Enter file name to save", "Save as...
Here is a simple copy and paste from cell A1 to D1 using vba Sub cpy() Range("A1").Copy Destination:=Range("C1") End Sub
I did not write this code but I think that it may help you. For more information about this code...
Hello Can you upload sample of your workbook?
Hi, Thanks for the reply. I need to find a formula for finding the column number, i can't give a...
Not sure if this will help. When you save your file click Tools>General Options and then click on Always create...
Sheet1 column "A" must have at least 2 rows (Cells A1 and A2) of data for macro to work. Less...
Hi, thanks for the code. But I’m not getting any result even if the condition is met. I have attached a sample sheet here – http://www.megafileupload.com/8hwq/sample.xlsx. Please review it. Thanks in advance.
Thanks for the reply and ur time 🙂 I found the answer to this 🙂
Any help please?
I need to do the same type of calculation for different cell rages from “TP” sheet and update the result in “WBR45” sheet in different cells. And also slightly modify the formula.
Destination cells in WBR45 sheet – AE104,AE105
These are cell ranges in TP i will use – (I3 to K30 and M3 to M30) ; (Q3 to Q30 and U3 to U30)
Difference in formula – "=PERCENTILE.INC(" & rng.Address & ",90%)*24" ; "=PERCENTILE.INC(" & rng.Address & ",50%)*24"
& rng.Address &
",90%)*24" ; "=PERCENTILE.INC(" & rng.Address & ",50%)*24"
If a template is given ,I can keep adding how much ever range and destination cells that I want to do this calculation.
This fixes it..how do I add multiple cells and formula in the same code?
I dont find the above line in the code..should I add this?
Awesome!! This is exactly what I wanted.
But there is a small glitch…the calculation is not correct…I mean the result in the destination is in thousands and it should not be like that..it will be a two digits and few decimals..If i apply the formula directly I’m getting the correct answer
Application defined or Object defined error in line – Sheets("WBR45").Range("AE103").Formula = "=PERCENTILE.INC(" & rng.Address & ",99%)*24"
http://www.filedropper.com/wbrsample – Check TP sheet
The formula calculates the percentile from sheet “TP” and paste it in cell in WBR45 sheet
If the cell has colored text, then that cell should not be included in the formula. The cell with only black colored text should be taken for calculation
I found the answer. Thanks 🙂
Dim lRow As Integer, i As Integer, j As Integer
Dim ws1, ws2 As Worksheet
Set ws1 = ThisWorkbook.Sheets("Latency")
Set ws2 = ThisWorkbook.Sheets("TP")
'Find last roe in Sheet1
lRow = ws1.Cells.SpecialCells(xlLastCell).Row
j = 2
For i = 1 To lRow
If ws1.Range("E" & i) = "COMPATIBLE" And ws1.Range("O" & i) = "Pass" Then