Once again hard without seeing it
Remember that Excel files are simply fancy Zip files
Some data like straight data and tables stores really well
Other data like Pictures or Logo's don't store well
Also avoid Pivot tables where you add data to a Data Model
It is not really clear what you are after but you have a few options
Sub Purchase()
If Sheets("PURCHASE").Range("D3").Text <> "Some text" Then Exit Sub
'Put the rest of the code here
End Sub
or
Sub Purchase()
If Sheets("PURCHASE").Range("D3").Text = "Some text" Then...
Pazi
on your worksheet you can call VisibleSpectrun simply
ie: in I11: =VisibleSpectrun(G11)
it returns violet ñâåì
To use the function in another subroutine or function simply use as an example i rewrote your VisibleSpectrumValue sub
Sub VisibleSpectrumValue()
Dim c As Range
For...
Count of events is: =COUNTIFS($A$30:$A$58,"Recorded",$B$30:$B$58,"Pre-School 0-5")
Attendance i : =SUMIFS($C$30:$C$58,$A$30:$A$58,"Recorded",$B$30:$B$58,"Pre-School 0-5")
This works for 2 case:
=COUNTIFS($A$30:$A$58,"Recorded",$B$30:$B$58,"Pre-School 0-5")
Can you clearly tell us what the 3rd case is ? as it is unclear above
Have you had a look at:
https://www.lejavbasolutions.com/primes/
or
http://www.vbaexpress.com/forum/showthread.php?61167-sieve-of-eratosthenes-vba-code-explanation
try:
'---------------------------------------------------
'Highlight the current cursor paragraph
'---------------------------------------------------
With TextBoxParagraph
.SetFocus
.SelStart = InStr(comstr, ans) - i - 1
.SelLength = Len(ans) - i - 1
.SetFocus
End With
Don
As far as I know, you can't control the formatting of a VBA TextBox's text, other than as a whole.
You can use other VBA Controls to hold the text, that will allow that functionality
eg: a Rich Text or HTML Box
I used:
Private Sub CommandButton2_Click()
Dim ans As String
Dim MyStr As String
MyStr = TextBoxParagraph.Text
x = 1
'MyStr = Replace(MyStr, Chr(10), Chr(234))
'MyStr = Replace(MyStr, Chr(13), Chr(234))
Dim SplitStr As String
SplitStr = Chr(13) + Chr(10) + Chr(13) + Chr(10)
Debug.Print MyStr...
@Peter
For one off jobs, Flash Fill has became my goto tool,
99% of the time it is very clever and can extract quite complex data patterns
Fixing up a few outliers is normally quicker than a custom formula
But I still use Formula's especially for more repetitive jobs