In the first sheet "Sheet1", I am trying to SUM the values of column C from another sheet 'XXX'. The trick is that the name of this other sheet is a variable, like Sheets(1+i).name , "i" being an integer. I can't find the proper syntax for the formula below.
I have a control sheet that needs to fetch numbers from a different worksheets depending on the worksheet name that I type into a cell. So if I type "sheet1" into cell A1 then I want the formulas on the sheet to automatically change fetch the data from sheet1. Then if I type in "sheet2" for example, the formula must then look at sheet2 for example. The source sheets are all identical in layout so not bothered about the actual cell ranges. I can do this in VBA but would like to keep this simple in Excel formulas.
I have a front sheet with a list of all the sheets in the workbook in column A. In column B I need to use the counta function to count the number of entries in the corresponding sheet to column A.
As there are 70 sheets I'd thought I'd use a Macro but I'm having great difficulties. I've done a search but can't find what I'm looking for.
So heres part of my code (it uses loops etc which I've managed but this just errors)
The str2 is the string name to reference the sheet in the formula (for example sheet1), I can't figure out how to enter this into the code so it works and is accepted.
i am needing to issue a dos command in excel? basically i need to send a target link to a file. i cant use a hyper link for several reasons, and this is the only way i know how to go about this.
I am trying use target Bval in a sheet. Can I give conditions like if only the value is number then trigger the code else no. Is there a possibility???
If for example cell A1 begins empty with no data in it other than a formula and something occurs to change the state of cell A1 to a value which triggers a change in cell B1 (a variable), can I use this to fire a sheet change macro ????
Wish to trigger a macro on sheet change based on every cell in column C, is this even possible ???
Or, is a change in a variable (C1) for example, the same as that of a DIRECT user keyboard input for example ???
Code:
Private Sub Worksheet_Change(ByVal Target As Range) Dim c As Range If Not Application.Intersect(Target, Columns(3)) Is Nothing Then Application.EnableEvents = False For Each c In Target
I have added this bit of code to change the apperance of entered time from 0835 to 08:35
UserInput = Target.Value If UserInput > 1 Then NewInput = Left(UserInput, Len(UserInput) - 2) & ":" & Right(UserInput, 2) Application.EnableEvents = False Target = NewInput Application.EnableEvents = True End If
And it works like a charm. Except that if the content in one of the cells later is deleted a "Run time error 13" is the result. Debug leeds to the line "If Userinput >1 Then"
I need VBA code for the following - I have a worksheet with seven colums of data (A to G) - I need to copy the first column (A) from the active worksheet then open master workbook called 'master' and paste the data in to column D - then save the 'master' as the name in cell Z1 of the 'master' workbook. Once this has been been completed I need to repeat the process but this time copying column (B) and so on.
What i have in cell D3 is the formula 'Today ()' to show the date formatted like so. January 2012.
In cells B1,B4,B7,B10,B13,B16,B19,B22,B25,B28,B31,B34 are results showing targets for set each month of the year (B1=January, B2=February etc). What i want to do in cell D4 is show the target for the month that we are in, in other words the target for the month showing in cell D3.
I have a spreadsheet at work . I am tracking the quality target for the department and I need to create a formula that adjust accordingly to the target set for month end which is 90%.
I have build in the foreacasted numbers for the whole month but I need the formula to indicate the minimum error points needed to achieve the target of 90% for month end when I replace the forecasted numbers on a daily basis with actual numbers.
I have attached the spreadsheet which will be clearer.
i am trying to us the SUMIFS formula to work out if a rep is below target on selling brands.
I have two worksheets summary and data, Summary worksheet is where i am trying to do the sumif formula against a sales average taking the information from the data worksheet I have account manager name, brand, sales, DSI I tryed the below sumifs formula but its coming back as 0
Please could someone have a look and point out the error in my ways =COUNTIFS(data!$A$2:$A$11,B17,data!F2:F11,"<B2)") The first count if should count how many times the account manager appears in the brand and the second count is if his DSI on the data worksheet is higher that the target dsi on the summary sheet
I need to hide/unhide a couple of rows based on the result of a formula in the Target Range. Basically, Cell D2 contains the results of a sum (a+ B), if this is greater than 10,000, unhide the next row.
I was working on a chart to calculate my Amazon seller rating to see how many more perfect order I need to hit my next target grade. Here is how the calculation works.
Order with no problem gets 100 points per order Minor problem gets 0 point Moderate problem minus 100 points Severe problem minus 500 points
Grade are evaluate by: <84.5 Fair <96.5 Good <98.5 Very good Above is Excellent
Total points / total orders = final grade (or percentage)
As of now i got : 53800 (points) / 624 (orders) = 86.22(%)
Now that I know what grade I've got so far and I also want to know how many more perfect orders I need to achieve my next targets or in case some bad orders come by and how far they pull me down.
Attached is my work sheet so far and I'm just missing the calculation for the orange shaded part.
I'm struggling to come up with a formula that ill give me the following:
I have will have a row of data (cells A4:H4 on the attached example), in the respective cells below each value in row 4 I want formula that will give me a value of 10 if it sees 90% in the cell above reducing to a value of 0 if it sees 80% in the cell above. I think that there should be a relatively straightforward formulae for that, my problem is that I want to add a further criteria that says; if the value in row 4 increases above 90% and reaches 95% then I must return a value that is 10 for 90% but "stretches" to 12 for 95%. Anything below 80% should return a value of 0, and anything over 95% should return a value of 12.
As you can see, the second column contains abstracts which I want to use to determine categories for each document (each line).
Categories are as followed : Diabetes prevention -> keywords : sugar, diabet*, insulin* Obesity prevention -> keywords : weight-loss, fat*, LDL etc. (5-8 categories)
To target one keyword, I found this formula : =IF(IFERROR(SEARCH("*diabet*"; $B3); 0); "Diabetes prevention"; " ")
What I would like to know is how to add more than one keywords in this formula.
I would also like to know, if it is even possible, how to put every categories in this column, so that i don't have a category per column ... It's hard to explain.
I want to have in front of each line the corresponding column. It means that the formula has to search for every keywords and select one or more appropriate categories.
I have main worksheet (target a) that I am trying to populate data from target(worksheet) b. The data I am trying to get from target b changes every month,(declining balance) based on a new month. So how can I get financial data from different cell each month from "b" into same cell in "a"? (so "A" # would be overwritten in same cell based on new # from "B". I have tried VLookup but can't be doing something correct.
I am using a piece of track changes VBA code mentioned on this site, which among other things creates a new column that reports the number of any cell that has been changed (e.g., $K$32). What I would like to do is, next to that cell, report the title of the row in which that cell appears. In other words, if someone changes cell $K$32, for easier reference I'd like others to be able to see that this cell appears in a row titled "New Sales". I'll be happy to clarify with more specifics if need be.
Is there a way to write a Worksheet_SelectionChange (ByVal Target As Range) event in module after creating a sheet in VBA? I constantly delete a sheet, then repopulate it with a new one that is empty, but I need to add some code that happens if they should change a particular cell. It worked when I ran it on a worksheet without refreshing, but as soon as I cleared and repopulated the sheet, it was gone. Is there a way to preserve this?
Note: I know the syntax below is not how you would enter forumlas into Excel but I am using it to quickly illustrate what I'm trying to do and need help with. A cell not in column D, E, or F contains a formula of the form: F=IF(D>0, D/E, "blank") . Note: If a cell in column D>0 (eg. D5>0) then the cell to the right of the selected D cell (eg. E5) will also be >0 ; otherwise, both cells will be empty.
This is what I want to do: If cell D?>0 , then F?=D?/E? ; otherwise, F?=empty .
Example 1: If D5>0, then F5=D5/E5 ; otherwise F5=empty . Example 2: If D7>0, then F7=D7/E7 ; otherwise F7=empty . Etc. I want this to apply to all rows.
I cannot enter the formula directly into the F? cell because sometimes I will need to enter data into cell F? manually. When I need to enter data manually into F? this results in the formula being overwritten by the new data and this means that if I ever needed to have data calulated based on the formula F=IF(D>0, D/E, "blank") I would have to re-enter the formula from scratch over again; obviously this is a nusance.
I am trying to create a macro so that when i save an entry the form sheet looks in the tavela master sheet to see if there is a match on the record number (in the A column) and saves there as an update if it matches and then if there is no match, saves it in the last empty row. this is a column to row copy so it has to be paste special to transpose. also i have a password on the sheet which i use to unprotect then reprotect. i have successfully done these two things separately but cannot combine them! i know not very much about visual basic code just what i have read here and so i am trying to make this code work.
I am currently using this Formula to Search a table on sheet 2 (Tabelle2) and copy the date in the relevent cell (Cells) into the correct cell on Sheet 1 (Master Sheet).
[Code] ..........
Used in cells E10:AZ30 and E33:AZ46
This works perfectly and is the formula behind all relevent cells in Sheet 1.
I would like to keep this but to add that it also copies the background color of the cell in Sheet 2 to the cell in sheet 1.
If i can Bring this Formula into VBA and add the color changing part, It must only work on the cells listed above..
I want to use " sheet name" as Vaiable keeping format the same. For Example in the following example :if I type Sheet2 in cell A1 I should be able to change this range " sum(Sheet1!b3:b5" to "Sheet2!b3:b5"
I'd like to compare values from different sheets. My sheets contain data from different years. I have sheets named 2000, 2001, 2002, 2003.... I also have a sheet named "compare". Now I'm using functions like: =('2008'!J13/'2007'!J13)-1 which gives me the relative change between years 2007 - 2008 in the cell J13.
I'd like to use the sheet name as variable. For example: "year 1" is given in cell A1 and "year 2" given in cell A2. Then I could enter (for example) 2007 in cell A1 and 2008 in cell A2. How can I use these cell values in the function? I’ve tried something like: =('A2'!J13/'A1'!J13)-1. I assumed that 'A2'!J13 would be the same as '2008'!J13. It didn’t take me long to figure out that doesn’t work. What would be the right way to do this?
I am trying to use a variable for the name in the Sheets command so that I can put in the names of the CSV file that I have captured in a variable. Here is the macro that I recorded using Excel 2007:
I require 1 more variable to take this MySName and assign it to a workbook name and make it is as .xls as i required this workbook name to be used later to close the workbook
For ex: MySName = ActiveSheet.Name
this gives MySName =aaaa
Now i want like MyWBook = aaaa.xls
But aaaa i want it from variable as we cannot hardcode it.
I have a workbook with a list of staff in it. The format is: the manager's name is in row 1, the 8 or so team members are listed below. And again in row 20, there is a manager's name with 8 or so team members listed below. This is duplicated over many columns and multiple sheets. The sheets are all named after the ops-managers who manage all the managers on their respective sheet. The book is called "stf.xls"
I'm using the following code to look up a staff member and return who their manager and ops-manager is to the relevant cells in a different workbook:
Code: Sub AdvisorFind() Dim Wsht As Worksheet Dim Slookfor As String
[Code]....
My problem is how to return the manager's name for a staff member in the middle of the book. Activesheet. is the last worksheet so no good. Wsht.name.Range(manager) is what I want to do but I don't know the correct syntax.