Re: Trying to make a program for my sheet to fill in info automatically
Quote from pike;749352Larbec is in the library he has posted at chandoo
Actually I am in the lab LOL, keeping tabs on me
Re: Trying to make a program for my sheet to fill in info automatically
Quote from pike;749352Larbec is in the library he has posted at chandoo
Actually I am in the lab LOL, keeping tabs on me
Re: Trying to make a program for my sheet to fill in info automatically
Quote from pike;749104Larry what are you doing
So fast to accuse much like our Government, guilty to proven Innocent LOL How are you Pike? You ask what I am doing? Doing what some say is impossible Making money (-:
Re: Trying to make a program for my sheet to fill in info automatically
Quote from KissAce;749048I am some what new when it comes to excel. I have some basic programming formulas but a fast learner. I found this on line and down loaded and it looks interesting and wanted some help to see if anyone could make this sheet run by itself. I will try my best to explain. There are 4608 different ways to put thee letters in a specific cell. Every time you enter a new combo it will display the answers which are numbers in the columns over in AI through AN down to row 72. If you put certain combos in it will not leave any numbers in AI through AN and that is okay too. I just want to know what numbers are left for each combo when this program runs. I think you call the programs a macro. I have listed on the spreadsheet all the different ways to make the combos work and the sheet is called different letter combos. Where the different letter combos have to go is the sheet called The Game. I have placed formulas in the cells on The Game sheet so you can see where they go back to. I want to run all the way down from row 1 down to row 64 placing all these combinations in from columns E to CE. If you can imagine clicking on a button or making the program RUN and then it starts loading the letters into the cells on the sheet called The Game as it works its way through all the different combos. I am sure someone on here is capable of figuring this out. I know it would take me years to learn what you experts already know and I am much obliged by your help. I am sure you may have questions and I will do my best to answer them
Gratitude
Ace
Ace,
I responded to your PM. I am not sure where you found this but let me try to explain. Number 1 there are not that many combinations and only 512. Not sure where you got that many from Lordy LOL. Look me up when you are at school. I will be there most of this coming week. I'm already working on the Macro and almost have it complete. As far as getting it to do what you expect that won't happen. You need the rest of the puzzle so to speak. I am sorry to tell you i will not be giving that out so what you are trying to accomplish is useless to anyone else besides myself. I have made so much progress the past 8 most its overwhelming. Like I said, come by and talk to me and perhaps I can help you out with what your needs may be besides my spreadsheets.
Re: How can I do a search for numbers that are in rows
Kenneth,
man I'm so sorry you didn't get any help on here. They normally respond pretty well and I'm sorry for not getting back with you but you are correct were swamped plus personal things going on. You know me well enough that I don't forget about folks and try to help others when we can. I promise to give you shoot you an email and a recommendation do a board that responds pretty much ASAP I've also placed some thing in your behalf (-: perhaps folks here are just so busy plus the holidays. Send Kjbox a PM and see if he will respond to you before you just give up
take care and ttys
Re: Conditional Format based on value in corresponding cell
Sure thing Pike Hope your having a blessed year
Re: Conditional Format based on value in corresponding cell
Do you still need help with this? If so, upload a spreadsheet and I will give you a hand
Quote from plumwood;733973Display MoreHi,
I want to do a formula that looks at the value in one cell and then if the one in the next cell is a certain value the cell colour needs to be yellow, green or blue.
So for example if the FSP is 4 and the target should be 1 so would be green, however if its 2 its better so would be blue and less than 1 would be below so yellow.
The FSP levels and what they would be if on target are
3 or 4 should equate to a 1a, 1b or 1c, 5 should be a 2c, 6 would be a level 2b, 7 a Level 2a and 8 a level 3.
Hope that makes some sense and someone is able to make head or tail of it,
Thank you in advance.
[TABLE="width: 192"]
[tr][/tr]
[TD="class: xl66, width: 64, bgcolor: #F2F2F2"]FSP[/TD]
[TD="class: xl66, width: 64, bgcolor: #F2F2F2"]Target[/TD]
[TD="class: xl66, width: 64, bgcolor: #F2F2F2"]Actual[/TD][tr]
[/tr]
[tr]
[/tr]
[tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]4[/TD]
[TD="class: xl65, bgcolor: transparent"]2b[/TD]
[TD="class: xl65, bgcolor: transparent"]2c[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]5[/TD]
[TD="class: xl65, bgcolor: transparent"]1a[/TD]
[TD="class: xl65, bgcolor: transparent"]1a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]5[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]6[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]6[/TD]
[TD="class: xl65, bgcolor: transparent"]2b[/TD]
[TD="class: xl65, bgcolor: transparent"]2c[/TD]
[/TABLE]
Re: How can I do a search for numbers that are in rows
Quote from JnK;734010Thank you larbec, can you explain how to use this and what to do with it? I think I know you LOL, your name (larbec) rings a bell. If you are from East Texas let me know if your the same guy
MODERATOR NOTE: please don't quote whole posts.
Lol, yes I'm from East Texas. PM if you'd like or if you do know me text me and I'll help where I can. I think I know what your trying to do too. I did some back reading. It was Kbox that did this VBA originally. You may want to contact him. He is busy but he is AMAZING and knows EVERYTHING about VBA and very quick to respond. Great guy.
Godd Luck!
Re: Conditional Format based on value in corresponding cell
Quote from plumwood;733973Display MoreHi,
I want to do a formula that looks at the value in one cell and then if the one in the next cell is a certain value the cell colour needs to be yellow, green or blue.
So for example if the FSP is 4 and the target should be 1 so would be green, however if its 2 its better so would be blue and less than 1 would be below so yellow.
The FSP levels and what they would be if on target are
3 or 4 should equate to a 1a, 1b or 1c, 5 should be a 2c, 6 would be a level 2b, 7 a Level 2a and 8 a level 3.
Hope that makes some sense and someone is able to make head or tail of it,
Thank you in advance.
[TABLE="width: 192"]
[tr][/tr]
[TD="class: xl66, width: 64, bgcolor: #F2F2F2"]FSP[/TD]
[TD="class: xl66, width: 64, bgcolor: #F2F2F2"]Target[/TD]
[TD="class: xl66, width: 64, bgcolor: #F2F2F2"]Actual[/TD][tr]
[/tr]
[tr]
[/tr]
[tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]4[/TD]
[TD="class: xl65, bgcolor: transparent"]2b[/TD]
[TD="class: xl65, bgcolor: transparent"]2c[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]5[/TD]
[TD="class: xl65, bgcolor: transparent"]1a[/TD]
[TD="class: xl65, bgcolor: transparent"]1a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]5[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]6[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD]
[TD="class: xl65, bgcolor: transparent"]3b[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]7[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD]
[TD="class: xl65, bgcolor: transparent"]2a[/TD][tr]
[/tr]
[TD="class: xl65, bgcolor: transparent"]6[/TD]
[TD="class: xl65, bgcolor: transparent"]2b[/TD]
[TD="class: xl65, bgcolor: transparent"]2c[/TD]
[/TABLE]
Im on my iPad at the moment but when I get to my desktop I will look at the CF tool bar and direct you if cytop hadn't already. It can be done simply with the =>< commands and you would format (color shade) your cells how you want them. Do sorry, just can't remember which statement to use If i do I will post it
Re: How can I do a search for numbers that are in rows
Quote from holycow;733992lol, quite the opposite, code is a bit advanced for me
ah, may be from Kbox. He is not only a genius with VBA he is quick. Maybe he will chime in or someone that can help him. I have no clue lol
Re: How can I do a search for numbers that are in rows
Lol, so sorry Holycow, guess the code is written badly which if is it your correct it didn't come from you.
Same here. You really helped me out ALOT and much appreciated I was only trying to help
Re: How can I do a search for numbers that are in rows
I may get dinged by the mods on here fir the VBA code. I tried to put it in ## but I guess it doesn't want to do it from my iPad so my apologies before I get a mark against me. I know the rules and I tried to post the VBA correctly 4 times. It simply won't take from my iPad I guess
finally took
Re: How can I do a search for numbers that are in rows
See if thus will work for you. Can't remember who helped write this but it was another on here. I "think" Holycow" was there name. I had quite a bit help from 3 folks on here The others were Jindon and Kbox. All fantastic programmers
Sub test() Dim myPtn As Range, r As Range, x, myTxt, mymatch As Range
Dim ff As String, i As Long, y, flg As Boolean, myAreas As Areas
Dim Match
Columns("c:e").Borders.LineStyle = xlNone
Columns(6).ClearContents
Set myAreas = Application.InputBox("Select the pattern range(s)", Type:=8).Areas
For Each myPtn In myAreas
myTxt = myPtn(1).Value
Set r = Columns(3).Find(myTxt, , , 1)
If Not r Is Nothing Then
ff = r.Address
Do
x = Evaluate(r.Resize(myPtn.Rows.Count, 2).Address & "=" & myPtn.Address)
For i = 1 To 2
y = Filter(Application.Transpose(Application.Index(x, 0, i)), False)
If UBound(y) <> -1 Then flg = True: Exit For
Next
If Not flg Then
If mymatch Is Nothing Then
Set mymatch = r.Resize(myPtn.Rows.Count, 3)
Else
Set mymatch = Union(mymatch, r.Resize(myPtn.Rows.Count, 3))
End If
r.Resize(myPtn.Rows.Count, 3).BorderAround Weight:=xlThick
r.Offset(, 3).Value = "x"
End If
Set r = Columns(3).FindNext(r): flg = False
Loop Until ff = r.Address
End If
Next
MsgBox IIf(mymatch Is Nothing, "No match", Replace(mymatch.Address, ",", vbLf)), _
, IIf(mymatch Is Nothing, "Not ", "") & "Found"
If Not mymatch Is Nothing Then mymatch.Select
End Sub
Display More
Private Sub CommandButton1_Click()
Dim c
Dim firstAddress As String
With Worksheets("Filter").Range("F2", Range("F" & Rows.Count).End(xlUp))
Set c = .Find("x", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Offset(, -3).Resize(1, 3).Select
Set c = .FindNext(c)
If MsgBox("Next Match?", vbYesNo) = vbNo Then Exit Sub
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub
Display More
again Good Luck!
Re: Conditional Format based on value in corresponding cell
Hi there Plumwood, I've dealt with a lot if conditional formatting. I'm not sure if you will need this bit of wisdom but once you have one sheet completed and "if" you have multiple sheets , you can copy and paste just the CF to the other columns You may need to change the column letter for example if it's in F and you copy to N change the F to N.
Good Luck!
Re: How can I do a search for numbers that are in rows
Hi JnK,
i have something that may work for you It's been a while so let me find it and I will post the code for you I do not believe it will post answers on the next sheet but it will search for EVEN numbers vertically ONLY so the Macro will need some tweaking I'm away from my desktop but will see if I have it in the cloud and try to get it on here for you
Good Luck!
Re: Macro to clear out all cells
Here is the code I tried to get to run and did not leave it in the book but for some reason it is not working either. Perhaps someone can critique it
Sub ResetLinksAsPerSelectedGame()
On Error GoTo trap
Application.StatusBar = "Starting off relinking, please do not interrupt"
Application.EnableEvents = False
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
'iterate over the selected game range (myGameRange) and get existing cell in formula and change that with the number that you keyin
Dim rng As Range
Dim newGameNumber As Integer, externalCellRefOld As String, findPos As Integer, externalCellRefNew As String
Dim oldFormula As String
Dim newFormula As String
Dim gameRangeName As String
Dim lCounter%
'range to iterate over the external cells
Dim rangeToIterateOn(2) As String
Dim gameRow(2) As String
rangeToIterateOn(0) = "gameRange": rangeToIterateOn(1) = "gameRange_1": rangeToIterateOn(2) = "gameRange_2"
gameRow(0) = "gameRow": gameRow(1) = "gameRow_1": gameRow(2) = "gameRow_2"
oldRef.Range("A:B").Clear
lCounter = 2
For itr = 0 To UBound(rangeToIterateOn)
gameRangeName = rangeToIterateOn(itr)
newGameNumber = Val(game.Range(gameRow(itr)))
'newGameNumber = Val(InputBox("Enter New game number", "Game Reset", 1948))
'If newGameNumber = 0 Then newGameNumber = 1948 'set it as default
For Each rng In game.Range(gameRangeName)
DoEvents
Application.StatusBar = "Updating cell: " & rng.Address & " - " & rng.Formula
oldFormula = rng.Formula 'store the old refrence in the
oldRef.Range("A" & lCounter) = "'" & rng.Address
oldRef.Range("B" & lCounter) = "'" & rng.Formula
lCounter = lCounter + 1
'set new formula in game book
newFormula = oldFormula
findPos = InStr(1, oldFormula, "!")
externalCellRefOld = Mid(oldFormula, findPos + 1)
'get the cell number in the old formula and replace with the new game number and update the formula
externalCellRefNew = Replace(externalCellRefOld, getNumber(externalCellRefOld), newGameNumber)
newFormula = Replace(newFormula, externalCellRefOld, externalCellRefNew)
rng.Formula = newFormula
Next
Next itr
Application.EnableEvents = True
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Application.StatusBar = "Refreshing..."
game.Calculate
Application.StatusBar = ""
MsgBox "Completed New Link"
Exit Sub
trap:
MsgBox Err.Description
Application.EnableEvents = True
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Function getNumber(sRef As String) As String
Dim cellNumber As String, tChar$
For i = 1 To Len(sRef)
tChar = Mid(sRef, i, 1)
If IsNumeric(tChar) Then
cellNumber = cellNumber & tChar
End If
Next
getNumber = cellNumber
End Function
Function getSingleDigitCounter(nNum As String) As Integer
Dim sDigit As String, sDigNew As String
sDigit = nNum
While (Len(sDigit) > 1)
For i = 1 To Len(sDigit)
sDigNew = Val(sDigNew) + Val(Mid(sDigit, i, 1))
Next
sDigit = sDigNew
sDigNew = ""
Wend
getSingleDigitCounter = Val(sDigit)
End Function
Sub test()
MsgBox getSingleDigitCounter("345")
End Sub
Sub resetExcelEvent()
Application.EnableEvents = True
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Display More
Re: Help writing a Macro to clear out all cells
The Macro does not work when I place it in the book. This is the actual book
Re: Macro to clear out all cells
When I say the starting row will be different I am talking about each "set" of books may start at a different row. If I have 5 "different sets" of books lets say ABCDE A may start at row 1054 and all associated external books will also start at 1054 with in the set of A, B may start at row 352 and all the external books associated with B will all start at the same row. I just wanted to ability of taking the same Macro and be able to place them in any book. Hope that clarifies things
Re: Macro to clear out all cells
I have no intentions on confusing you are anyone so my apologies. I thought by just uploading a single sheet would be best since some do not like downloading from links. Here is the main Input book I am referencing too. As always, I THANK YOU, you are AMAZING and put the Excel (surpass) in Excel!! The clear on the game sheet is to clear out the letters in IJ TU AE AF
Re: Help writing a Macro to clear out all cells
(There is a hidden formula in A8, A:16, A:24 (L and W) foranother book) these are all in the blue sections)
A3: A8 Drawn Numbers tab F Q AB AM AX BI
A11:A16 DrawnNumbers tab C N Y AJ AU BF
A19:A24 DrawnNumbers tab I T AEAP BA BL
A29:A35 DrawnNumbers tab BI:29 BF:32 BL:35
The same tabs above also go to the same Drawn Numbers tabfor columns L and W
L3: L8 DrawnNumbers tab F Q ABAM AX BI
L11:L16 DrawnNumbers tab C N Y AJ AU BF
L19:L24 Drawn Numbers tab I T AE AP BA BL
L29:L35 Drawn Numbers tab BI:29 BF:32 BL:35
W3: W8 DrawnNumbers tab F Q ABAM AX BI
W11:W16 DrawnNumbers tab C N Y AJ AU BF
W19:W24 DrawnNumbers tab I T AEAP BA BL
W29:W35 DrawnNumbers tab BI:29 BF:32 BL:35
The counters (CDEF NOPQ XYZ AA AB) come from each externalbook.
R3:R8 Numbers Book
R11:R16 50+ Hit Numbers Book
R19:R24 OB Hits Numbers Book
R:29 NumbersBook
R:32 50+Hit Numbers Book
R:35 OB Hits Numbers Book
GH RS AC AD comes from the same Game# sheet ref columns androws
Not sure if you needed this but if you did, hope this helps
Re: Help writing a Macro to clear out all cells
Thanks for replying Kj!!! (-:
I want to link to 3000 rows in all. The lowest will be 100 and the highest 3000. You are correct they will increment down. I would like the option to start the linking on any row after 100. I may have in one book all the data up to row 1054 and on another it may be 352. So, I may need two buttons I am not really sure YOU are the MASTER and know BEST how to do this.
I am not certain what you mean by this: "The links will increment down one row per button click until the minimum row number is reached at which point the link will go back to the maximum (starting) row number"
Every time I enter a new Drawn Number in the Input tab say it goes in Row 1949 IJKLMN. The sheet attached Game #40 increments to Game #41 and all the data in the cells change from rows 1948 to data in rows 1949 and so on. There are already programs in these rows that will place the new counter numbers and data to the new game sheet once tied together.
Do you need to know which cells goes exactly to and from where? If so, I can do that really quickly?
Again, THANK YOU!!!