Need Help: Count based on 2 Different in VBA (Dates in Indian Date Format)

Mahantesh_Torgal

New Member
Joined
Sep 12, 2016
Messages
23
Hi Excel Masters,

I need to count few items in Different column(Eg. Column A) based on start & end Date(column B).

However , dates are in Indian Date Format (01-Jan-2018).

Attached is the sample file.

E.g: If 'Lenovo T450' , i want to count them between '01-May-2018' & '21-May-2018' in VBA.

I tried but Date is coming as US Format (5/1/2018) & (5/21/2018) in code which i want in INDIAN Date format.

Can any one please help. Please check below data and let me know result.

I Need DATES IN INDIAN DATE Format only

Assigned DateLaptop Model
18-Mar-16Lenovo T450
18-Mar-16Lenovo T450
10-Jun-16Lenovo T450
18-Mar-16Lenovo T450
18-Mar-16Lenovo T450
5-Mar-16Lenovo T440
18-Mar-16Lenovo T450
17-Mar-16Lenovo T450
18-Mar-16Lenovo T440
15-Apr-16Lenovo T450
11-Apr-16Lenovo T450
22-Apr-16Lenovo T450
1-Sep-16Lenovo T450
22-Mar-16Lenovo T440
15-Mar-16Lenovo T450
11-Aug-16Lenovo T450
14-Mar-16Lenovo T450
19-May-16Lenovo T440
15-Mar-16Lenovo T450
4-Oct-16Lenovo T450
15-Mar-16Lenovo T450
2-Aug-16Lenovo T450
4-Apr-16Lenovo T450
4-Apr-16Lenovo T450
6-May-16Lenovo T450
6-May-16Lenovo T450

<colgroup><col><col></colgroup><tbody>
</tbody>

Regards,
Mahantesh
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Can you show us your VBA code ? I don't see any "2018" in your sample data ...
 
Upvote 0
Please show us your VBA code & where/what error message you get? Can you simply change the format similar to the below code

Code:
Sub test()

Dim dDate As Date
dDate = "31-May-18" ' "31-May-18" = #5/31/2018#

Debug.Print Format(dDate, "dd-mmm-yyyy")

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,392
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top