Formulas Recognizing The Patterns
Aug 15, 2008
I am trying to do an "if" statment to look in every 23rd cell to see if it is greater than 0. if it is it populates what is in that cell. That is fine...
The problem is i want to create the "if" statement just a couple of time manually, than drag it down 300 rows and have it look every 23 cells. It does not recognize the pattern???
View 11 Replies
ADVERTISEMENT
Jan 24, 2012
I was wondering if there was a way to create patterns when copying and pasting formulas?
For example, here is what I want to do right now:
=AVERAGE(Sheet1!I2:I650)
=AVERAGE(Sheet1!I2:I649)
=AVERAGE(Sheet1!I2:I648)
=AVERAGE(Sheet1!I2:I647)
=AVERAGE(Sheet1!I2:I646)
=AVERAGE(Sheet1!I2:I645)
=AVERAGE(Sheet1!I2:I644)
=AVERAGE(Sheet1!I2:I643)
=AVERAGE(Sheet1!I2:I642)
=AVERAGE(Sheet1!I2:I641)
=AVERAGE(Sheet1!I2:I640)
In other words, have a pattern in the formula?
Or something like this, but filling out cells horizontally.
=A1/A100
=A1/A99
=A1/A98
=A1/A97
=A1/A96
=A1/A95
etc...
Or:
=A1*A1
=A1*A2
=A1*A4
=A1*A8
=A1*A16
=A1*A32
=A1*A64
etc...
View 1 Replies
View Related
Dec 30, 2009
I've got an Excel 2003 sheet where column E has a 6-digit code input into it. I'm able to right a function off that code that outputs if E2 (for example) equals 123456 then H2 outputs "Dog," if E2 equals 123457 then H2 outputs "Cat," and so on until I reach the max of 7 nested functions. Problem is, I have a lot more than 7 codes that I need to analyze. This Excel sheet will be used every two weeks, with lots of codes input that need to have what the code means output. I created a named formula called "part1" where: =if(sheet1!E2=123456,"Dog",if(sheet1!E2=123457,"Cat", etc. It didn't work when I had $ in front of E & 2.
All variables in "part1" work when tested where H2 = part1. I created a "part2" with more variables, checked each and it works too. My problem now is that when I have H2 set to =if(part1,part1,part2) to test all the variables, it'll work on any variable in "part2" but not in "part1."
View 3 Replies
View Related
Jul 29, 2013
I have the following code for identifying the 1,3,2 patterns from sheet1 and it copy pastes those rows into sheet2. I was wondering if there is a way to modify this code to delete those patterns once it has identified them instead of pasting them into sheet2. In other word,s sheet2 needs to contain every other data except those identified patterns.
VB:
Sub test()
Dim myPtn As String, txt As String, m As Object, n As Long, LastR As Range
Dim ws1 As Worksheet, ws2 As Worksheet, myStep As Long, i As Long, t As Long
myStep = 10000 '<- change here if needed.
Set ws1 = Sheets("sheet1")
Set ws2 = Sheets("sheet2")
[Code]...
View 2 Replies
View Related
Nov 3, 2013
A person on this board did this for me with this so far and I need to be able to view more than 16 rows. I would like to view all the rows it finds. I have 62,000 rows on information this far and will exceed 500,000 so you can see my need to see all involved to save hours of sifting through data. I would also like a place up top near the box (column G.H)(3,4,5) another box for me to enter a new number combination to search. Presently I have to go through the data to find the first one which is also time consuming. I would like to be able to put say for example in the area I am mentioning:
2 6
4
2 8
View 1 Replies
View Related
Jan 19, 2010
I'm trying to divide the hours between 2 given times in blocks:
i.e.: monday 0600 - 1400 = 8 hrs
2400-0700 [mon - fri] = 1
0700-1800 [mon - fri] = 7
1800-2400 [mon - fri] = 0
0000-2400 [weekend]
I got the first 3 blocks working but got stuck with the 4th one.
It should count only those hours between saturday morning 0000 and sunday night 2400 if it concerns a weekend day. and actually these hours should not be calculated in the first 3 time blocks.
View 12 Replies
View Related
Sep 24, 2009
Hope the title isn't too broad. Every time I think I have got to grips with RegExp I get stuck on something apparently quite simple. So, I have a few queries so I hope OK to bundle them together.
1. How do I remove the word 'of' only if it occurs after certain other words (the other words should also go). E.g.
"Vale of White Horse" should stay the same
"Borough of Lambeth" should become "Lambeth" (because 'of' after 'Borough')
I tried "Borough(sof*)" but that doesn't remove either word.
2. How do I remove everything after a '/' (inclusive)?
I have tried "/sw+" which removes the first word after '/' but there could be other words
3. How do I remove everything inside brackets (inclusive)?
View 6 Replies
View Related
Dec 7, 2009
I have a football pool worksheet. My goal is to have a button that displays a message box with the players in order of how many points they have. So far I have been able to display this message box with one problem...
The problem occurs when there is a tie between two players. If they have they same score it will only display the first score in the row. In my attachments when you press the macro button "score" it displays a message box saying:
"Sue is in first place with 12 points.
Bob is in second place with 9 points.
Bob is in third place with 9 points.
Larry is in forth place with 3 points."
I want it to say:
"Sue is in first place with 12 points.
Bob and Dave are tied for second with 9 points.
Larry is in (third or forth, doesn't matter) place with 3 points."
Even if it needs to say
"Bob is in second place with 9 points.
Dave is in third place with 9 points."
would be an improvement.
Here is my code so far and i've attached the file.
View 7 Replies
View Related
Sep 28, 2009
I have a spreadsheet which will be used to measure raw material consumption by day.
I wish to list all days of a year down a column - that I can do.
However, I would like to conditionally format any cell (preferably the row) which contains either a Saturday or a Sunday.
View 9 Replies
View Related
Oct 26, 2007
I am tryig to create a macro that looks up a value between two workbooks. In the workbook the value may be on the 1st, 2nd, or 3rd worksheet. So far all that is returned after the macro is run is a cell with the formula in it with no values. This is the macro formula:
Do While rcnt <= lrow
Cells(rcnt, 3) = "=if(iserror(vlookup(cells(rcnt,2),rng1,12,0))=false,vlookup(cells(rcnt,2),rng1,12,0),if(iserror(vlookup(cells(rcnt,2),rng2,12,0))=false,vlookup(cells(rcnt,2),rng2,12,0),if(iserror(vlookup(cells(rcnt,2),rng3,12,0))=false,vlookup(cells(rcnt,2),rng3,12,0),"""")))"
rcnt = rcnt + 1
Loop
View 5 Replies
View Related
Jun 6, 2007
I have an xy chart for which I would like to format the lines to be different patterns beyond those available in the format series dialog. I recognise that this will mean using VBA and I am happy to do that. I would like to be able to use patterns in the same way as they are used in a column chart.
I recorded a macro to see which properties were changed when the patterns are selected in the dialog for the xy chart and it is clear that it is only the LineStyle of the border and that there is no interior.
With Selection.Border
.ColorIndex = 57
.Weight = xlMedium
.LineStyle = xlGray25
End With
This would explain why when I use debug.print ser.Interior.Pattern I get -4105 or if I change ser.Fill.Forecolor etc it has no effect.
Is there any way to use user defined patterns to colour the lines in the same way as in a histogram/coloumn chart?
View 5 Replies
View Related
Jun 7, 2007
In a Worksheet On Change event I am trying to obtain a new value that the user has placed into a particular cell.
However, when I get to the line of code that reads the value in that particular cell, it is pulling the value that was in the cell prior to the change. When I view the sheet I can see the new value. When I do a debug.print or ? in the Immediate Window it shows the prior value.
View 9 Replies
View Related
Aug 27, 2009
I have a date of hire column in mm/dd/yyyy with 5000 rows. It contains many different formats and I need to sort it by year. Is it possible to sort by year and include all months, i.e. everyone hired in 2008, by month.
It also seems that Excel is not recognizing some of the formats as dates.
View 9 Replies
View Related
Aug 20, 2014
I'm trying to create an auto fill pattern to match B4-M4 then repeat with B5-M5 and continue to 350.
So for example, I'd like to manually enter "B4,C4,D4,E4,F4,G4,H4,I4,J4,K4,L4,M4,B5,C5,D5,E5,F5,G5,H5,I5,J5,K5,L5,M5" into column A and drag the auto fill box down until I've repeated the pattern to match all the way to M350.
Is this possible? I tried just entering the pattern as I've posted and dragging the auto fill down, but it doesn't fill the numbers properly and ends up with a strange pattern.
View 5 Replies
View Related
Apr 14, 2009
I am using Excel 2007 and I need to search for data patterns that are spread across many columns. I am not sure how to search so that criteria is met across all the columns concurrently.
For example
I am interested in data that matches the following criteria ;
Column B has the value 55
Column C has the value 70
Column D has the value 80
Rows of interest are when all the criteria in columns B,C,D are met at the same time (e.g 55 in B, 70 in C and 80 in D).
View 9 Replies
View Related
Oct 10, 2011
I have created a spreadsheet to find cyclical patterns and my next task was to sort these patterns from highest value to lowest.
Next I need to start from the first row of the sorted spreadsheet and find the first row working down that repeats. Once I find his row I have to stop the search and highlight both the original and repeated rows. If the first row has no repeat it has to move to the second row and do the same operation until it finds a row that does repeat and so on.
View 8 Replies
View Related
Feb 27, 2009
Split from How To Set Up A Spreadsheet The Right Way
Taking onboard what you suggested I have "rethought" the layout and it is now in a single table format. What had stopped me doing this previously was the fact that I was not able to show 7 days a week for 48 weeks in columns. However thanks to the transpose function all the data is now more user friendly (See Attached Workbook)
You mention the data should be quite easy to manipulate from here, any ideas as I am struggling with the concept of how to display the data in a time series. I assume that it will involve some form of lookup function referenced to the table of times, but thats as far as i can get.
View 3 Replies
View Related
Oct 6, 2008
I guess because I use a drop down box and another cell reference for the date, my IF/AND statement isn't recognizing the date and therefore gives me a "FALSE" result. I have the date formatted as a date.
I've tried referring to cell I2 which is the drop down box - that doesn't work. I've tried using quotes around the date as if it were text - that doesn't work. If I use just the w10=3 part, that'll work fine but it must be associated with the proper week otherwise every 3rd of the month that falls on a friday will be a holiday.
View 3 Replies
View Related
Apr 3, 2009
I am trying to find a formula that calculates the longest period from data in an adjacent cell.
The attached spreadsheet might better explain this
View 6 Replies
View Related
Sep 22, 2009
I am working in two different files. If number "40556" on worksheet B is showing on worksheet A, the function is to state "TRUE", but it's stating "FALSE". Both files' numbers are listed as GENERAL under FORMAT CELLS.
View 12 Replies
View Related
Dec 20, 2011
I have an autofilter setup with 3 values: "Show", "Hide" and "Always". The show/hide values are dependent if formulas based on other cells.
I have two sheets with this filter (Template and Summary); the filter works fine on the Template tab, however on the Summary tab...
When filtered to only show values "Always" and "Show", the filter only recognizes some of the "Show" values. I have copy pasted the if formula from the rows that work to the rows that don't and verified the formatting is the same. There are no named ranges that may be screwing it up and no empty cells in the filter range.
If I manually unhide the rows in questions, then run the filter, the rows stay shown. However, if I run the filter to only show "Always", then run it again to show "Always" or "Show", then the rows in question disappear.
I also have vba assigned objects for show and hide (the same scripts are used for the Template sheet and the Summary sheet), but the issue persists when using the buttons.
I hard code "Show" instead of it being an if formula, the filter works fine. But the formula that doesn't work is also used on rows that do work.
View 9 Replies
View Related
Feb 16, 2012
In cell I2 I have a data validation list. If the selection is "2" then I want to copy and paste a value from another cell to another sheet.
I did a recorded macro but the code does not recognize the selection from the data validation celll, I2.
Is there some code I can add to get the macro to recognize what the user selected?
View 5 Replies
View Related
Aug 9, 2007
I'm using a macro to send the contents of a sheet to an html file. The problem I am having is that for some reason it is not recognizing the blank cells in the last column (column 9) of the sheet, thus I am not getting the " " that I need in the html code. The code for column 7 works fine and is identical. I did a test and selected column 9, right clicked, and "Cleared Contents". When I ran the macro again it worked fine. The problem is that sometimes there may be data in column 9, so I can't clear it. Here's the code I'm using. Is there another condition I can use to look for a blank cell or something I can do to the spreadsheet for my code to work?
If Cells(i, 9) = "" Then
a.writeline " <td valign=""top""> </td>"
Else
a.writeline " <td valign=""top"">" & Cells(i, 9).Text & "</td>"
End If
View 4 Replies
View Related
Sep 29, 2013
Perhaps I missed something in the basics of Excel as to how a table's column header is formatted.Also, my date format is dd/mm/yyyy
When using a basic formula, such as below, in A1 and Cells A2 and B2 have the dates 1/01/2013 and 2/01/2013, this code works fine.
VB : =If(A2<=Today(),"Yes";"No")
BUT, when you convert those two dates to a table, the formula with post No.
However, if you make another formula as show below, the correct day will come up.
VB : =Text(A2,"dddd")
When auto filling the dates in the row, without a table, the dates increase per day.
When auto filling the dates in the row, with a table, the dates increase per year. (And yes, even when 3+ dates are inserted, highlighting those 3 and then autofill.)
Why does a column header change the format and to what format is it changed to?
Why do some formulas output accurate date based on the date in the column header and others do not?
Why do the dates increase per day without a table and per year with a table?
View 3 Replies
View Related
Sep 15, 2013
Whenever I copy and paste dates from the internet I can't get Excel to recognize the info as dates, thus making it impossible to sort by date. It doesn't matter which site I use, I have the problem with all of them.
[URL]
Using any of the links above, how I can paste those dates and get Excel to sort the date?
View 1 Replies
View Related
Dec 19, 2011
I'm trying to change the colour palette to include patterns (for charts). Is this possible? We use Excel 2003.
View 1 Replies
View Related
Apr 30, 2013
I'm attempting to do work on pattern detection and actions based on how said patterns occur in a column. Here is what I would like excel to do for me:
Code:
Pattern W1
Example A1=A , A2=A , A3=B
Pattern L1 Consecutive "A" 3 or more
Example A4=A , A5=A , A6=A
Triggers on specific events:
While L1 tracking variable = 0 -- If L1 is found, mark a variable to -2 then set the corresponding cell in the column over to the value of the variable (-2)
While L1 tracking variable < 0 -- If consecutive L1s are found one after another, then (on each consecutive occurence) multiply the variable by 3, then set the corresponding cell in the column over to the value of the variable
If W1 is found while L1's variable is < 0, then multiply the value of the L1 tracking variable by -1 and add 1, then set the corresponding cell in the column over to the value of the L1 variable, then set L1's tracking variable to 0
If W1 is found while L1's variable is = 0, then set the corresponding cell in the column over to the value of 1
All data is in one column.
View 1 Replies
View Related
Jul 6, 2006
I have a list of two columns. Here’s an example. The left most column provides the row number.
_ A B
1 1 0
2 2 1
3 2 1
4 3 2
5 4 2.5
6 5 4
7 1 0
8 1 0
9 2 2
Whenever there are two repeating numbers in column one, I want to reduce certain numbers in column 2 by a certain amount. The amount is determined by half the difference between the number in column B corresponding to the second repeated number and the number in column B corresponding to the row after the second repeating number. The range of numbers that are to be reduced begins with the row after the second repeating number and ends with the last row before number one appears in column A. The values in column A are integers, always starting with one. For example, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 4, 5.
For the above example, after finding the repeating number two’s at A2 and A3, it would reduce B4 through B6 by half the difference between B3 and B4 (1/2). The values for B4 through B6 would be updated in column B. The same for the next repeated numbers, which is one at A7 and A8. Half the difference between B8 and B9 is 1.
Here’s what the updated list would look like:
1 1 0
2 2 1
3 2 1
4 3 1.5
5 4 2
6 5 3.5
7 1 0
8 1 0
9 2 1
View 9 Replies
View Related
Jan 8, 2007
I am currently tracking online PPC keyword reports with Excel and need to know if there is a function that will find and match words and phrases and then add the columns that are queried for the matching words/phrases. I think an example is definately in order.
December PPC
Keyword Clicks Cost Revenue
large dogs 45 .18 $12.00
small dogs 35 .25 $15.00
January PPC
Keyword Clicks Cost Revenue
large dogs 12 .14 $8.25
small dogs 18 .18 $5.35
Now using the example above I need a function or maybe even a macro that will scan all "keywords" and find a match for each keyword each month, say large dogs, and then add the clicks, costs, and revenue columns and post them on a particular row or rows.
So when running the function it will find and match "large dogs" for each month, it will then add the clicks for all months with "large dogs" in it and then populate a column or row with the total along with the keyword "large dogs" next to it. Is there a function that will do this or maybe even a macro?
View 10 Replies
View Related
May 30, 2013
I've digitally signed a macro in Excel, where I'm sending mail from using outlook, but I can't seem to get Outlook to recognise the certificate in outlook, even though both programs have my name as a trusted publisher...... so still getting the "A program is automatically trying to send mail on your behalf" Pop up.
How to get outlook to recognise the certificate on the macro that I'm running from excel?
The main issue being it is sending roughly 50 separate emails, and to wait five seconds and manually have to click 'yes' for each one is not really desirable!
View 6 Replies
View Related