I'm trying to simplify a section of my code by naming a long string that is repeated. I tried by simply place the Name before equal sign (=) and also putting Set before the name. Both failed though I've seen both methods used successfully in other code. Am I having a syntax issue of some sort?
Private Sub ConditionalRowDelete() Dim NumRows, iLine As Integer ActiveSheet.UsedRange.Select NumRows = ActiveSheet.UsedRange.Rows.Count Dim CircuitType As Range Set CircuitType = Range("C" & iLine).Value For iLine = NumRows To 2 Step -1 If Range("A" & iLine).Value > "6999" Then Rows(iLine).EntireRow.Delete End If Next iLine For iLine = NumRows To 2 Step -1 If CircuitType = "VOIP" Or CircuitType = "Customer Care" Or CircuitType = "Dialup" Or CircuitType = "IRU" Then Rows(iLine).EntireRow.Delete End If Next iLine End Sub
Get a SUMIF formula to work, which it now does, but the formula puts '$' signs in the range, so that when it copies it, it does not change the range. I have got round this, by defining 12 separate ranges. But it does make the code rather long winded. Anyone know how to put the formula in without the '$' signs? There must be a way to put the formula into the first cell, and copy it across?
Set Rga = Range("b6") Set Rgb = Range("b6").End(xlDown) Set Rgd = Range("$e$6") Set Rge = Range("$e$6").End(xlDown) Set Rgc = Range(Cells(6, 2), Cells(6, 2).End(xlDown)).Offset(0, 3) Set Rgh = Range(Cells(6, 5), Cells(6, 5).End(xlDown)).Offset(0, 3) Set Rgi = Range(Cells(6, 5), Cells(6, 5).End(xlDown)).Offset(0, 4) Set Rgj = Range(Cells(6, 5), Cells(6, 5).End(xlDown)).Offset(0, 5) Set Rgk = Range(Cells(6, 5), Cells(6, 5).End(xlDown)).Offset(0, 6) Set Rgl = Range(Cells(6, 5), Cells(6, 5).End(xlDown)).Offset(0, 7) Set Rgm = Range(Cells(6, 5), Cells(6, 5).End(xlDown)).Offset(0, 8) Set Rgn = Range(Cells(6, 5), Cells(6, 5).End(xlDown)).Offset(0, 9).............................
I'm trying to solve a strange problem in a piece of code.
I have a variable that is define as Double called STD. When i try to insert that variable in a formula the decimal sign (for me a comma "," because I'm Portuguese) gets converted to ";" (which is for me the separation sign for the expressions in excel formulas. ex: AND(A1>0;B1>0)=TRUE). The code is:
When I try to copy formulas across do I get a little black plus-sign in the lower right corner of the cell, when I point to it. I can then drag the plus-sign to the the area where I want to copy the formula. This plus-sign has now disappeared.
This seems way too simple to do yet I can't get it right. It will highlight some that are different and not highlight others that are different. I need to compare column A to O and highlight differences, B to P and highlight difference, and so on.
You take a childs actual age in months and years (ie 9.8 for 9years and 8months). They then, in theory, should be at that age level for reading and spelling.
I have the age in B4, the reading in C4 and the spelling in D4. If i use CF to say i want C4 to be red if it's less than B4, Amber if it's the same and green if it's over, as soon as i okay it, C4 goes amber, because it's equal to B4, which is blank. I can get the colours to work, i just can't figure out what to put to turn the amber off when cell B4 is empty.
I've tried as many combinations as my little amount of excel knowledge can cope with.
I am trying to create conditional formatting to ascertain whether values in one table (Table 1) are different from another identically formatted table above it (Table 2) (so each cell in Table 1 has a corresponding cell in Table 2).
If the value in a cell in Table 1 is different from its corresponding cell in Table 2, the cell should highlight in red.
Every cell's corresponding cell is the same distance away.
I tried to put in a conditional formatting for C5 (C5 being the first cell in Table 2), which works, but this breaks and turns to #REF every time i save and re-open the document.
I have 3 rows with numbers across several columns, each cell holding one number only. For example:
R1: 1101 - 1102 - 1103 - 1104 - etc. R2: 2101 - 2102 - 2103 - 2104 - etc. R3: 3101 - 3102 - 3103 - 3104 - etc.
A little further down I am having a list where the end user will write down the exact same number. Once the same number has been written into the list, I would like the number shown in the top rows (row 1 to 3) to be highlighted in green, basically telling the user that the number has been entered into the list below and is ok now.
When the data is loaded ( the numbers you see) I want to copy all the data below a persons name ( number behind complaint, call etc) to the sheet which has the same name as the person. the data has to be copied to the correct weeknumber I use in the main worksheet.
The 40 additional sheets are build up like:
Weeknumber-------wk1-------wk2------wk3------wk4------etc Complaints Help Call hours etc
So the data has to be copied under the correct weeknumber. The data in the main worksheet is loaded with a function and I quess the data also has to be copied without the fucntion (?)
I'm having trouble with a small vba macro. At the end of the macro I test to see if two variables are equal and then print out true or false. However, for some reason even though the variables are equal vba is not treating them that way. I have put the values that represent the variables on a spreadsheet and used the if(x1=x2) formula and it says it is true, also, when I debug the macro and watch the values when it comes to test the logical expression the numbers are the same. I don't understand why vba does not say that the two variables are equal. I have attached a screenshot of the breakpoint where I double check the values are equal.
I am new to macro and just trying to learn. I have a spreadsheet with 20000 rows and 8 columns. I am trying to identify equal rows based on the values of columns C, D, E and F. then I need to separate equal bunches with a blank row. Then I need to copy the ID number from the first cell of column B of each bunch and paste it for the rest of the rows in that bunch. I have written the following code but this does not put the ID of the first cell in a bunch for the rest of the rows in that bunch.
How to correct my formula because it does not work?
Here the formula: =COUNTIFS(Data!C2:C24005,A17,Data!M2:M11149,"<=0")
I need to insert the formula in column C (Findings tab) which counts the rows in Column M (tab named "Data") that equal A17 (Column A in "Findings" tab) and which are less or equal zero. In addition if I drag the formula down I want to only the values be entered in highlighted in blue cells in column C (SKUs With Zero Sales in "Findings" tab) and empty cells in not highlighted cells. I attached images of these two tabs: Data and Findings.
I have a very frustrating problem with my business plan i am writing in Excel. every so often it crashes and when I open it again all the £ signs have turned to $ signs and i have to go through and painstakingly change them all. This also happens even if I just close the file carefully and open it up again. I have tried looking in preferences to see if there is a default setting but can't seem to work it out. can anyone help me with this tiresome issue?
I want to save phone no as +99 9876543210 in excel 2003 on my xp pro machine. But if i give a + sign in the cell, some blue dotted rectangle shows up and everything messes up.. I think it is treating it as a formula or something... how can i save this in the cell. tell me in detail if you are going to tell me about macros or vb code as I don't know how to insert code or program macros.