With following code
Dim i As Long
For i = 1 To Len(Selection.Value)
Debug.Print i & ")." & Asc(Mid(Selection.Value, i, 1)) & "-" & AscB(Mid(Selection.Value, i, 1)) & "-" & AscW(Mid(Selection.Value, i, 1))
Next i
The output in immediate window is
1).84-84-84
2).104-104-104...
What will be life if there were no "ties" ;)
I was expecting it. You need to provide a tie-breaker logic in order to get desired results. In the past, there was one discussion; check if you find it useful
https://chandoo.org/forum/threads/tiebreaker-formula-not-working-as-expected.36011/...
Well, it is not custom made to solve your problem but it should be good enough to nudge in the right direction. If you already have put together something then post it here along with your data layout and describe the issue. It will be easier to help you with it then.
There are several codes available online. Key is to search for the one that appears closest to your needs and adopt it.
See if below link helps you in some way:
https://www.rondebruin.nl/win/s1/outlook/amail8.htm
Here's one which is available on Microsoft site.
https://support.office.com/en-us/article/convert-numbers-into-words-a0d166fb-e1ea-4090-95c8-69442cd55d98
@Marc L I suspect OP means words and not text formatting!
Etb, see my post which is a VBA solution. You can also use a formula and auto-filter to achieve this.
To insert VBA code in your workbook you can refer instructions in below link
https://www.ablebits.com/office-addins-blog/2013/12/06/add-run-vba-macro-excel/
Welcome to Chandoo Org Forums!
Assuming that you have data in Column A and Column B is empty then below macro will identify all rows not to be deleted as you have mentioned.
Public Sub IdentifyDeletionRows()
Dim i As Long
For i = 4 To Range("A" & Rows.Count).End(xlUp).Row Step 4
Range("B"...
Off late, I have not checked this section of the forum that often and this post just silently passed by! I have always thought that the forums like these simply existed and never accounted for the fact that they must have begun some day. It has been a wonderful journey so far and I have been...
You probably will have to use VBA solution like below.
Public Sub ReplaceNumbers()
Dim rg As Range
For Each rg In ActiveSheet.UsedRange
If IsNumeric(rg.Value) Then rg.Value = "X"
Next
End Sub
Otherwise to mimic what it is doing, you need to create an UDF like below.
Public Function ufLTRIM(strInput As String) As String
ufLTRIM = LTRIM(strInput)
End Function
Public Function ufRTRIM(strInput As String) As String
ufRTRIM = RTrim(strInput)
End Function
And then use like normal...
You can probably cut down the formula like below considering the fact that OP's posted data is consistently formatted.
=TRIM(MID(SUBSTITUTE(SUBSTITUTE(A3,"<",REPT(" ",99),2),">",REPT(" ",99),1),99,99))
Your setup and requirement is bit unclear.
Suppose in cell
A1: 03-Mar-2019
B1: 31-Dec-2019
C1: 01-Oct-2019 (start date of the month you are interested in)
then you can try:
=NETWORKDAYS(MAX(A1,C1),MIN(B1,EOMONTH(C1,0)))
There's a built-in object in MS Word VBA called tasks.
https://docs.microsoft.com/en-us/office/vba/api/word.application.tasks
It should give you starting point!
Basically yes!
The issue is not that it cannot transpose beyond 65536 but it doesn't raise any error.
Public Sub TestThis()
Dim x As Long
x = 1048576
a = Evaluate("ROW(1:" & x & ")")
b = Application.Transpose(a)
For i = 1 To x
Cells(i, 1).Value = b(i)
Next i
End Sub
Error will come in the...
Since you have variable x which is an integer and therefore will have elements much less than the limit anyway.
However, if in reality you have more elements than the limit then there will be no one-liner code. Instead an array will need to be populated using conventional methods. You can get...
You can try:
Dim x As Integer
x = 4
a = Application.Transpose(Evaluate("ROW(1:" & x & ")"))
Word of caution: Application.Transpose has limitation beyond 65536 elements.
You can use below approach to loop through all workbooks...
Public Sub CheckForWorkbook()
Dim wbReqd As Workbook, wb As Workbook
For Each wb In Application.Workbooks
If InStr(1, wb.Name, "FileNameComesHere", vbTextCompare) > 0 Then
Set wbReqd = wb
End If
Next wb
If wbReqd Is...
There are several codes available online which do this. Example:
https://www.rondebruin.nl/win/s3/win002.htm
You need to adopt the one that suits your purpose.