Forumla To Give A Starting Number And Take One Away Each Time A Code Or Codes Are Dislayed In A Cell Range
Mar 22, 2009
In 1 cell i need a forumla to give me a starting number and take one away each time a code or codes are dislayed in a cell range. Something like this
A1 = 23 days or any number days i needed
Cell range B1:C52
every time a selected 1 or 2 letter code appears in the cell range i want A1 to subtract 1 day from the starting number, i would need it to subtract half a day if one code appears ie HD, the codes may be P, OT, HD
However, I want to use this same function in another place, without the limit set on the cells that will be cleared.
What I would like to do is send the formula the cell to start at (E14), offset that by one column, and then send a number of rows. With that, create the range to be cleared.
Looking for a way to search an active cell (that has been found using macro) for numerical data and if there is some present paste this in a different location
If there is no numerical data in this this cell then paste a 0 in a different location
An example of the string contained in the cell
Product 7.5% wheat <- i would want 7.5 (or 7.5%) copied to a different cell or Product X <- i would want a 0 copied to the cell the 7.5 would be in from the above
I can find the cell to search in, i just do not know the correct way to extract the information I need.
In the hours column usually the entries consist of numbers and everything works fine. However when an employee is on holiday they are still paid.
What I want to do is be able to enter the letter "H" for one of the entries in the hours column. The sheet to translate this as 2 hours.
H=2 x rate of pay = total
I cannot for the life of me get the correct formula to in order to achieve this. I don't particularly want to use a macro for this and others have suggested the "COUNTIF" function.
I have a macro that is copying information from one spreadsheet into columns "A through E" on the next available row in a seperate spreadsheet. Beginning with column "G through L" I need to copy the formulas from the row above in the same spreadsheet. Is there a way to do that since the row being copied from will change each time?
I need to change multiple conditional formats which apply to cell ranges 1 row x 17 columns wide. The specific change I am making is able to be acrried out with the code
With Selection.FormatConditions(1).Font .ColorIndex = xlAutomatic End With
However, I dont want the user to have to manually select each 17 cell area. I WANT THE USER TO JUST MANUALLY SELECT THE FIRST OF THE 17 CELL AREA. I want to write a macro that will THEN select a row of cells, 17 cells long, from the MANUALLY SELECTED position as at the moment of running the macro. Unfortunately the cells are not always on the same row in each sheet. On one sheet they may be on row 5, on another row 8 and on another, row 15 etc. I was wanting to be able to select a 17 cell range 'relative' to where the cursor is. How do I write the code to select the relative cell range? Is there an answer in an R[1]C[1]:R[1]C[17] sort of code?
I'm trying to develop a new daily timesheet for my production workers, where non-production items are recorded in 15 minute intervals. The user would put in "Clock in" by the corresponding time, and the same for "Clock out" at the end of the day. Any non-production items will be type in next to their appropriate time. Since clock in and clock out times will vary, I need to set up a formula that searches the array of cells for the day, finds the "Clock in" and "Clock out" values, and counts any blank cells in between them. Basically the blank cells will equal production time, and the result of the Count function will be multiplied by 0.25 to get the hours.
I am having a very difficult time finding a way to set the "Clock in" and "Clock out" cells as the range for the Count function, because it won't always be the same cells. What would be the best way to automatically have excel find the cells containing these values and set them as the range criteria for a Count function?
The formula at the bottom was one of my initial attempts, but it didn't work. I took out the '=' for the screenshot, so that wasn't the problem.
The codes in E column are what is entered in a worksheet range (user cannot see the list). Needed is to show both the two-character code in column E and the text definitions in column F in the dropdown. As data validation now works, users only see the two-character code and are not remembering what the code stands for - they need to see the definition.
Is there a way to show both the two-character code from column E along with the text in column F? When user selects, only the code would be entered in the target cell. (Is data validation the correct technique?)
I have set this problem up in closely located cells to construct the issue. In reality, the validation list is well off-screen from where the user is actually inserting the codes and there are many more codes/definitions.
I would like to create a vba script when ran an input.box comes up and asks you to "enter number you want to start numbering from" and when the number is entered in the input box. e.g "7654", excel starts numbering each cell in column A from 7654 until there is an empty cell in column B.
I have two dates lets call them cells A1 and A2. I then have another cell that caluclates the difference in these dates into a simple number (ie not another date) - A3. I need one of two things.
Ideally I want the whole cell (A3) to appear as a Green (fill) cell if the value is below 5, appear Orange if beween 6 and 9 and appear as red if its 10 or over.
I do not know if you can colour a cell that has a formula in already. So what follows is my current 'work around', which, if you can not colour the A3 cell, then I would need this cell coloured (A4). =IF(D12>7,"Urgent Attention",IF(D12<5,"New",""))
I have a worksheet with pricing & part numbers on sheet1. I put a formula on sheet2 that puts the lowest price in colum C of sheet2. Now I need to also get the part number from the cell before. So if the lowest price is in cell E3 I need to also get the part number in D3, and put it in B3.
Ihave this exel sheet i nedd function to write the starting date and time immediatly after i enter the name in the last colume ineed from exel to write the date and time emmideatly if the case is (done, cancelled ,or rejecteted)if the case is (select status )i want the cell empty but if the case is (pending)iwant to the program to calculte the deffirence between the ClosingDatetimee(which written by the program)and the delivering date(which entered manually by user)
I have to go through the tedious process of pulling out my areacode/time zone sheet and going through each of the phone numbers and assigning it the proper time zone in the zone column. Usually Est, Cen, Mtn, or Pac
I would like to create a function that will automatically assign the time zone to the area code for me and everytime I buy new leads I can run this same function which will save me so many hours of tedious work. I think I would need to save it as a macro after I'm done creating it if I'm not mstaken
I keep the 3 digit area codes in their own column, column "B" and I keep the Zones in column "D"
i have =TIME(LEFT(F17,FIND("h",F17)-1),RIGHT(F17,2),0). which gives a time in the format 9:30PM, or 10:30AM etc. How would i change the formula to give me a time minus 15 mins. Eg, if the above formula gave me 8:45PM, i would want it to show 8:30PM
Where C4 is 'Qualifying time', C5 is 'Starting fuel', C2 is 'Lap number' and C3 is 'Fuel consumption'. I also plan to make the 0.3 a changeable variable.
I'm not fussed as to whether or not this is a realistic function that would work in a real race, it's only hypothetical. However I would like to have a function that would give me the over all race time at any given lap, not just the lap time for it.
I Have 20:00-04:00 as text in a cell, what i need is to take the 04:00 and show only if its after 00:00 and before 07:00 and show it as time value. This is where I'm up to so far but i don't know how to ask it for > 00:00 and < 07:00.
I want to add comments to all the 1 value cells by selecting all 1 by shift + ctl +down
I can put same comments to all the cells?
If you want to have the same comment applied on many cells you could apply it to a single cell, then use the copy and paste special tool bar commands (under Edit) In Paste Special select "Comments" but value is going of that cell.
I have a spreadsheet, but I need the following formula to make our lives easier here.
I have the following columns:
Rate, I/T/P/S, FT/PT
I need a formula that when I enter "I" for Infant it will give me the FT (full time) or PT (part time) rate. All the columns have drop down menus, so if I choose "I" under the ITPS column and then choose FT, I want the formula to be able to give me the full time rate which is 157.94
Let's say I have a long macro and I want to test some code a ways down in the macro, but I don't want to have to run through all the code to get there, because I already have my Excel spreadsheet set up at the point I need to check and I just want to start checking the code a ways into the procedure.
Short of commenting out all the code above where I want to start, is there another easier way to do this?
The below code clears a sheete starting at row 7 and leaves the last row. I want to validation that if the only row with text is the starting row then I dont want the delete rows to happen
Sub clearRecap() Sheets("Recap").Select Range("a7", Range("a" & Rows.Count).End(xlUp).Offset(-1)).EntireRow.Delete End Sub
I need a code that search through a column, counts the numer of times a string occurs and creates on another sheet the unique string and the number of times it occured.
e.g
I have this columns in a worksheet
s/n name company trainer 1 ball Dell Mk 2 doll Msed Kl 3 kol Dlink Mk 4 ball Msed Cl 5 Koll Dell Gl
I need the result to appear on another worksheet like this
the listbox will show week 1 to week 52 and let me choose one of the week.
Private Sub OKButton_Click() If ListBox1.Text = "Week 26" Then Call week26 If ListBox1.Text = "Week 27" Then Call week27 Unload Me Sheet7.Activate End Sub
Sub week26() With Sheet7 .AutoFilterMode = False . Range("A1:I1"). AutoFilter.............
Since there are 52 weeks in a year, i have to type the codes for 52 times for different weeks. i don't need to type all these codes 52 times, instead one time with a loop or something else.