try this
=IF(COUNTIFS(Sheet!I:I,D4,Sheet!G:G,"<" &TODAY())=0,COUNTIFS(Sheet!I:I,D4,Sheet!G:G,"<"&TODAY(),Sheet!H:H,"<"&TODAY()),COUNTIFS(Sheet!I:I,D4,Sheet!G:G,"<" &TODAY()))
Dear Friends,
I have data like having 500 cells. I want to create 500 dictionaries with names on basis of value of coloumn B.
Refer below example
I want to create dictionary with name Mumbai, pune, Delhi .. So on..
A B
1 MUMBAI
2 PUNE
3 DELHI
Pls...
try this
Private Sub CommandButton1_Click()
tm = Cells(60000, 1).End(xlUp).Row
For Each ws In ThisWorkbook.Worksheets
ws.Activate
For i = 2 To tm
s = 0
For Each x In Range(Cells(1, 1), Cells(1, 22))
For Each y In Range(Cells(i, 1), Cells(i, 22))
If x = y Then
s = s + 1
y.Font.ColorIndex = 3...
you want to apply the same macro for each worksheets?
Try this .
Private Sub CommandButton1_Click()
dim ws as worksheets
tm = Cells(60000, 1).End(xlUp).Row
For Each ws In ThisWorkbook.Worksheets
For i = 2 To tm
s = 0
For Each x In Range(Cells(1, 1), Cells(1, 22))
For Each y In Range(Cells(i...
Sub test()
Set c = CreateObject("Scripting.FileSystemObject")
f = "C:\NewF" 'Change folder name and path here
If c.FolderExists(f) Then
MsgBox "Folder With Same Name is Already Exists There"
Else
c.CreateFolder f
MsgBox "Folder Created"
End If
End Sub
[code/]
Try this macro.....
Sub test()
Dim ws_in, ws_out As Worksheet
Set ws_in = Worksheets("In-Put")
Set ws_out = Worksheets("Output")
c_in = ws_in.Cells(ws_in.Cells.Rows.Count, 1).End(xlUp).Row
c_out = ws_out.Cells(ws_out.Cells.Rows.Count, 1).End(xlUp).Row
For i = 3 To c_out
If ws_out.Range("c" &...
Your duty starting time and ending time is not fixed...Running all data where many dates include ends up wrong output.
With little modification in this macro you can get desired output by running only single shift data.
you can try below macro.
Sub sbOpeningAFolder()
Dim FSO
Dim sFolder As String
sFolder = "C:\bulk"
Set FSO = CreateObject("Scripting.FileSystemObject")
Call Shell("explorer.exe " & sFolder, vbNormalFocus)
End Sub
Sub mytest()
Dim mydic As New Dictionary
Dim c As Range
Set c = Range("a1").CurrentRegion
arr = c
For i = 1 To UBound(arr, 1)
If arr(i, 1) = "" Then
arr(i, 1) = arr(i - 1, 1)
End If
If mydic.Exists(arr(i, 1)) = True Then
mydic(arr(i, 1)) =...
try this..
1. remove this formula.
2. clear cell format.
3. cover your formula in T function.
like below.
=T(HYPERLINK(IF($A3="","",IF(INDEX(DB_List,VLOOKUP($A3,DB_RowIndices,2,FALSE),K$1)="","",HYPERLINK("mailto:" &...