and the trouble I am having is that in the second Countif, I need it to check the cell in the "D" column relative to what cell is being checked in the "B" column. Right now it is checking every cell in "B" against "D7" instead of "D8, D9, D10", according to what cell in "B" is selected.

I have 8 columns of data, the first 4 and the last four columns have the values which correspond to each other.. Here is an example:

VALUES(A to D)NAMES(A to D) ABCDABCD 1.3451641.3383581.286221.359808321325370391

So value 1.345164 corresponds to 321 and 1.28622 to 370. I need a function that will return a value from one of the VALUES columns which corresponds to the second smallest cell value from the NAMES columns. For example – here the second smallest number in NAMES column is 325 so the function would return the corresponding value of 1.338358.

My sales spreadsheets have a column which is turned to 100% when the order comes in (i.e. when the salesman gets it in his commission). I have applied conditional formatting to turn the whole row green when this happens (for ease of seeing which orders are in)

We also have a cell for the Purchase Order "number" (as these come from the customer, these can be a straight number sequence - "12345" or a mix of letters and numbers - "ABC12345"). My boss would like this cell to be red if the "order in" column is at 100%, but there is no PO number.

However, when I put in the formatting: (1) =$K$15=1 (to turn the row green) (2) Cell Value is equal to 0 (to turn the cell red)

it will apply (1) no problem, but will only apply (2) if (1) is false. (i.e. if (1) is true, the whole row goes green, with no red in the PO box.)

If I switch them round (i.e. have (2) first), then I get the formatting that I want (i.e. green row with a red box), but if (1) is false, I still get a red PO box.

What I need is a way of only applying (2) if (1) is true. (or any other way of only making the PO box red if the order is 100% but there is no PO number)

did in [URL] but my issue is complicated by not knowing what cell I need to move the graph to.

I am using Excel 2010 and I am a realitive novice at writing VBA code.

In My spreadsheet, I have a list of properties and some related cost info. From week to week, the number of properties varies. Some days I will have 6 properties and others I could have 100. Because of this, I need to make all of my references relative to other cells. I am having trouble repositioning the graphs that I have created from the data to be 2 cells below the label I have created for the graph (which is a merged cell covering Columns B:I on a row 3 rows below the last property in the report.

So far, I have:

Dim r1 As Range, r2 As Range, GraphRange As Range Cells(2, 1).Select Selection.End(xlDown).Select

dont know if this can be done using a formula rather than VBA...but is there a formula that would change the countif range based on another cell entry. so the formula below has a column range of 2...so the other cell entry would be '2'.

=COUNTIF(B1:C1,"=Y"). If i then changed the cell entry to '4' the formula would change to. =COUNTIF(B1:E1,"=Y")

Is there a Countif that works on the criteria of the font being 'Red' or 'Bold' ? This needs to work based on conditional formatting I have on the cells in question.

I am currently using a color count function to both count by color and count by color and cells containing certain characters, such as # or %. This works great.

However, I need to modify the UDF to count all the cells in a range in columns C:Z that contain alpha, AND IF the Interior.ColorIndex of a cell in column B within the same row of the counting formula equals the Interior.ColorIndex of a cell in column B within the same row of the selected cell in the range.

Basically, Column B is a header row, and I want to count the cells in a range in each column C:Z if they contain a name AND their corresponding header cell's color in column B matches the color of the header cell in the row containing the formula.

Im trying to get a message box to pop up if the result of a count formula is greater than one; ie. in a list of data to warn of repeats of a certain key reference.

Ive never had a drama with putting a message box in before but ive only based it off a constant reference whereas in this case, it will be based on a relative reference; for example, when inputted a value in A2, that has the same value in A1, the count formula in B2 will be 2, so i want a message box to come up. Same goes if the same value was put in A3, and B3 was greater than

I need a macro that can run a serial# 1 t0 10 (or more or less) with A1 being starting point. Here is my illustration data.

Coloumn:A Coloumn:B 1 IrfanAneeza 2 Scooby Dooby Do 3 Dooby Dooby Do 4 Yaba Daba Doo

However, there is a little kicker in it. The range of coloum:B varies all the time i.e. B:B could be 1 to 10, it could be 1 to 3 etc. Thus, macro should list serial#'s based on the coloumn B:B range of data.

Each week I format a report that I receive that lists every product a particular employee closed. Its a list of each employee, the product and date. I'll have about 20-30 lines for each employee. I can easily sort by the employee name to have a nice list.

From here what I do is use a forumla to mark where each employee's name changes, then filter by that changed line and insert page breaks for each of these lines. Is there a way to macro this to save me time, having 270 employees takes alot of time still, because thats 270 manually inserted page breaks.

My problem today, is actually being able to call the routines. I have tried to make a generic setup, so that each subroutine to be called is named "Macro_[number here]". So Macro_1, Macro_2 etc. By doing this I am hoping to be able to call all the subroutines using a For Each code.

Below is my code which isn't formatting the cells it's suppossed to. It looks like it isn't doing anything. I think the issue might be with the highlighted section of my code, but when I go to "Manage" my rules for conditional formatting, excel references the appropriate cell under the "Applies to" section. I am using relative cell references for for the majority of the rest of the code and this section follows a section that selects the correct cell for this conditional format.

The problem I am trying to solve is to have a cell return a cell value based on another linked cell. The cells I want to link are in separate tabs or could be another workbook.

For example if cell A5 in sheet2 is linked to A20 in sheet1...A5 has formula(=Sheet1!A20). I want the next cell B5 to look at A5 and return the value of cell Sheet1!D18.

So in essence I want the second cell to look at the first cell and return a value that is 3 columns over and 2 rows up.

I'm importing comma delimited files into Excel. These files will contain formulas, but do not know on which row they will end up in once imported. My formula's need to reference the row they have been pasted to. For example, If I paste the formula on Row 2 the formula would be =A2+B2

Row 3 =A3+B3

However, since these formulas are coming in via a non-excel file, I need the cell reference to be dynamic. Something along the lines of =A#+B# where # would be interpreted by Excel as the current row the formula is on. (I know that '#' isn't correct.)

I have recorded macros in the attached file to highlight cells that contain matching initials by using conditional formatting on the first cell and copying it to the remaining cells. The problem is that if rows are inserted above that change the first cell reference then the macro no longer works properly. Is there a way to use a relative cell reference within the macro? The macro buttons are in cells A4 to A13. I have no VB experience and created the macros by recording keystrokes and using tips found in this forum.

I currently have a list of totals that i want to easily be able to change the cells that make up this total.

I have been trying to set up one cell that contains the formula and then the remaining totals below are linked to this cell. Thus I change the formula in the top cell all the other totals also change.

I'm working on my first real macro - so I'm a greenhorn. I've spent a few hours trying to research a solution, but most threads are too technical for me so I'm hoping someone can really help me out.

I am trying to use a formula that references a cell that changes day to day from when I use the macro. I need to use a formula which grabs from a cell in a non concrete location. Let me try and show you what I mean.

This is one of about 25 sheets in one excel file, and I will be receiving about 5 different files a week, so a macro is necessary to save time. I tried to create a macro just by recording, and it was not able to adjust to the variances in the number of lines between the sheets.

I need it to do the following, and more or less in this order: -Delete Column A -Create text and format A1:C1 -Sort rows 2 through the last row based on column C values (from largest to smallest, although its not shown in the picture above) -Create a sum at the bottom -Apply grid lines to all the data

I don't have a problem with the first two, but I cannot figure out how to adjust for the number of rows for sorting, offset 1 cell down to create the sum formula below the data, or how to properly write the macro for the sum formula itself. When I recorded the macro, it used cell references like Range("C5").Select and others which do not adapt to the varying number of rows.

I tried using the offset command in this thread without much luck.

I am in the middle of my ICT A-level coursework and im required to design a spreadsheet with a grade system (A to F). The students have individual target grades and recorded grades from tests and homework will also be dispalyed. How do i change the colour of the cells of tests or homework depending on what target grade the student has. I will have to do this for about a hundred students, so conditional formatting isn't really an option to do each individual cell. I'm not familiar with coding, but can learn. Not sure if a formula can solve this either.

I have used the search function of the forum for this question but have not found anything regararding this.

Below is my function. I use it to count the number of times a value in A9 appears in Sheet2. I would like to edit my function to count the value in A9 that appeared in a given month in U6.(U6 is 12 for decemeber)

=IF(LEN(A9),COUNTIF(Sheet2!A:A,"*"&A9),"")

This is what I thought it would have been but I think I'm wrong because the function is not counting by month.

I have data in two columns. Column B has calculated string values of "BMAJOR" and "BMINOR" and column C has date values.

I am trying to get a count of how many occurences of "BMAJOR" or "BMINOR" occur for every week starting today. I have column AJ which returns today() and column AK which returns today()+7. I can individually count number of occurences of dates that fall within these dates with the following formula. This for row 2.

I have a list of University courses listed in Sheet1. Column A contains a unique course code. If there is a problem with a course, a second worksheet (called Anomalies) contains the same unique course code with description of the problem(s).

What I'm trying to do is: in Sheet 1, create a hyperlink to the relative cell in Sheet 2 that shows the course code and description. I've gotten close, but am not sure how I can do this without having to update two formulas. In short, I can't find a way to combine the two formulas.

What I've done is the following: in Sheet 1, column B, created a HYPERLINK formula, thus: =HYPERLINK("#"&CELL("address",INDIRECT(C54)),A54)

Column C contains a formula to lookup the relative position in the Anomalies worksheet, which can be referenced back to the HYPERLINK formula, thus: =("Anomalies!A"&MATCH(A54,Anomalies!A:A,0))

Sheet1 is fairly static, but Sheet2 (Anomalies) is being updated all the time. I could just hide column C and then column B will update based on that, but I'd prefer a cleaner solution.

I've tried joining the two formulas, by replacing the INDIRECT part with the second formula, as per the following: HYPERLINK("#"&CELL("address","Anomalies!A"&MATCH(A54,Anomalies!A:A,0)),A54) but I get an error.

Im looking for code for a button that asks for a Record number, and it will delete the record. But the record number is written in cells as 'Record No.1' 'Record No.2' etc. But i want the messagebox to ask for a single number and it would delete that record. Now the position of the records is what will be the difficult bit about this code, but it has a pattern.

For Record No.1 i need deleting cells C2:J100 For Record No.2 i need deleting cells L2:S100 For Record No.3 i need deleting cells U2:AB100

If anyone could give me a bit of code that works for these 3 then i could waste a load of time filling the rest of them out.

I am using VB to insert a function into a cell on an excell worksheet. The relative references work fine. For the absolute reference, I want to use a named range (LowTotal). If I simply put the name into the function, then I just get the name as text in the function. The second insert formula is were the named range is intended to go. Here is the code so far...

I need to know how to use the varriable name in the .formulaR1C1, so that VB knows it is a variable and not just text....

I have 2 columns, one containing a piece of data and one containing dates. I want to count how many times the data is in the first column, based on a specific date range in the 2nd column. I have attached a sample SSF with a better explanation inside it.