$$Excel-Macros$$ Re: Combining variables with Excel Formulas

2012-08-31 Thread Lalit_Mohan
can you please attach file in which you want to do this to make it more understandable Regards, Lalit Mohan On Friday, 31 August 2012 18:09:50 UTC+2, mburkett wrote: > > I have some code that is not working as I expected. I set a variable from > a value in a cell within the worksheet and add a

$$Excel-Macros$$ Re: Transpose (Arr) problem with Dates

2012-08-30 Thread Lalit_Mohan
Just append this line after pasting data in the range Range("E2").Resize(UBound(RealDate), 1).NumberFormat = "dd/mm/" Regards, Lalit Mohan On Thursday, 30 August 2012 23:27:37 UTC+5:30, RLM wrote: > > First post guys! > > I am trying to convert dates stored as text into proper formatted UK d

Re: $$Excel-Macros$$ Working days per employee (macro)

2012-07-08 Thread Lalit_Mohan
Dear Lokesh, For the blank cell issue just replace the TRUE with FALSE in .Pastespecial command line. And for the formulas what you have mentioned, i didn't find any formula in D3:I10 range.could u please clarify it. Regards, Lalit Mohan +91 9711867226 On Sunday, 8 July 2012 21:57:32 UTC+

$$Excel-Macros$$ Re: IN TROUBLE

2012-06-29 Thread Lalit_Mohan
Hi Azhar, Try this and change accordingly Sub InsertColumnWithFormula() Const lngNoOfColAs Long = 2 Dim varSheets() As Variant Dim lngLoop As Long Const strStartRange As String = "R1" varSheets = Array

$$Excel-Macros$$ Re: want data seperated by hypen - and comma , to be written in rows existing below eg X6-1,4,5,6,9,X7-2

2012-06-29 Thread Lalit_Mohan
Hi Vijay, Try this Sub SeperateData() Dim varVal As Variant Dim lngLoop As Long Dim rngRangeAs Range Dim strIni As String Dim strFinalAs String Dim strTemp As String Dim lngVal As Long Dim lngCell

$$Excel-Macros$$ Re: Help in Access

2012-06-29 Thread Lalit_Mohan
Hi Manoj, My previous post is just an example to show how you can get unique id just replace columna and table name accordingly. Regards, Lalit Mohan On Friday, 29 June 2012 15:14:18 UTC+5:30, Manoj Kumar wrote: > Dear Experts, > > > I have data in month wise data in Access in different quer

$$Excel-Macros$$ Re: Help in Access

2012-06-29 Thread Lalit_Mohan
HI Manoj, You can try this query in database may be it helps you select id from Tab_Data GROUP BY id (where id is the field name and Tab_Data is table name. you can add more columns to it just by adding column name with , and the same column in group by seperated by ,) Regards, Lalit Moha

$$Excel-Macros$$ Re: Book3.xlsx

2012-06-29 Thread Lalit_Mohan
Hi Neeraj, Revised with formula copy Sub FindFormula() Dim rngDtRange As Range Const strDataRange As String = "B1:B1000" Dim firstAddressAs String Const strFindFormulaAs String = "=RANDBETWEEN?" With T

$$Excel-Macros$$ Re: Book3.xlsx

2012-06-29 Thread Lalit_Mohan
Hi Neeraj, Hope it helps you Sub FindFormula() Dim rngDtRange As Range Const strDataRange As String = "B1:B1000" Dim firstAddressAs String Const strFindFormulaAs String = "=RANDBETWEEN?" With ThisWorkb

$$Excel-Macros$$ Re: Need excel formula

2012-06-29 Thread Lalit_Mohan
Hi Sriram, Could you please explain excatly what you are looking for so that we can provide you the solution related to the query. Regards, Lalit Mohan On Friday, 29 June 2012 12:10:47 UTC+5:30, sriram ji wrote: > > Dear Excel Guru, > > Please find the attached file and help me > > > > Than

$$Excel-Macros$$ Re: want data seperated by hypen - and comma , to be written in rows existing below eg X6-1,4,5,6,9,X7-23,56,67,X30 in cell c34 to be written as X6-1 in cell c34 X6-4 in cell c35 and

2012-06-28 Thread Lalit_Mohan
Hi Vijay, Hope it helps you Sub SeperateData() Dim varVal As Variant Dim lngLoop As Long Dim rngRangeAs Range Dim strIni As String Dim strFinalAs String Set rngRange = ActiveSheet.Range("A1") varVal = Split(rngRange

$$Excel-Macros$$ Re: Need Help !!! How to add sheet under another sheet

2012-06-27 Thread Lalit_Mohan
Hi, This kind of functionality is available in excel i don't know but we can achieve this not exactle but will look like this by using paste data as picture link. I don't know how much it will helful to you. Regards, Lalit Mohan On Wednesday, 27 June 2012 20:33:43 UTC+5:30, Mangesh wrote: >

$$Excel-Macros$$ Re: Message Box to Show ActiveSheet.PageSetup.Orientation

2012-06-27 Thread Lalit_Mohan
Hi, Try this also Sub PgOrentation() Select Case Sheet1.PageSetup.Orientation Case 1: MsgBox "xlPortrait" Case 2: MsgBox "xlHorizontal" Case Else: MsgBox "None" End Select End Sub Regards, Lalit Mohan UTC+5:30, stonesfan wrote: > I need to trap PageSetup settings to dete

$$Excel-Macros$$ Re: Delete Blank Cells.xlsx

2012-06-27 Thread Lalit_Mohan
Hi Vishwa, Hope it works for you Sub BlanksAtEnd() Dim rngRangeAs Range Dim rngStartAs Range Dim rngEnd As Range Dim varMonth() As Variant Dim lngLoo

$$Excel-Macros$$ Re: Need a VBA code

2012-06-27 Thread Lalit_Mohan
t work? > > Thanks again. > Sharath > > On Wednesday, June 27, 2012 3:38:12 PM UTC+5:30, Lalit_Mohan wrote: >> >> Hi, >> >> Try this on sheet selection change event >> >> >> Option Explicit >> Private Sub Worksheet_SelectionChange(ByVal Tar

$$Excel-Macros$$ Re: Remove Punctuation

2012-06-27 Thread Lalit_Mohan
Hi Ranjan, Please try this. Sub RemovePunctuation() Dim arrPunc As Variant Dim lngLoop As Long Dim rngCol As Range Dim rngRangeAs Range arrPunc = Array(".", "!", ":", ";", "-", "#", "(

$$Excel-Macros$$ Re: Need a VBA code

2012-06-27 Thread Lalit_Mohan
Hi, Try this on sheet selection change event Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Value <> "" Then Target.Value = BreakName(Target.Value) End If End Sub Function BreakName(ByVal strName As String) BreakName = Split(strName,

$$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-27 Thread Lalit_Mohan
Hi, Try this revised formula as my last post contain some error Evaluate("=Text(Day(""" & Sheets("Sheet1").Cells(count, BarDate).Text & """), """")") Hope it helps you Regards, Lalit Mohan On Wedne

$$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-26 Thread Lalit_Mohan
> Evaluate("=Text(Day(Sheets(RawData).Cells(count, BarDate).Text), > """")") > I tried it with and without the .text part. Both cases returned error > 2015 though I have a 4 digit year and the form is month/day/year which is > suppose

$$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-26 Thread Lalit_Mohan
Hi, You can use it as below also Evaluate("=TEXT(DAY(" & arr(i) & "),"""")") where arr is array and i is the index of the array or Evaluate("=TEXT(DAY("6/26/2012"),"""")") Regards

$$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-26 Thread Lalit_Mohan
to use it without the = but it said the function TEXT was > not defined. > I need a method that works in a VB program with the value 6/26/2012 stored > in the array previously listed. > > On Tuesday, June 26, 2012 9:01:08 PM UTC-7, Lalit_Mohan wrote: > >> Hi, >> >

$$Excel-Macros$$ Re: Run Macro at OPEN of an Excel file

2012-06-26 Thread Lalit_Mohan
Hi Prince, I think both the solution given by you are same. Regards, Lalit Mohan On Wednesday, 27 June 2012 08:43:37 UTC+5:30, Prince Dubey wrote: > > Hi Mitr, > > Private Sub Workbook_Open() > > 'Write your code here in workbook > > End Sub > > regards > Prince dubey > > > > > On Mon

$$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-26 Thread Lalit_Mohan
Hi, You can try this =TEXT(DAY(A1),"") Hope it helps you Regards, Lalit Mohan On Wednesday, 27 June 2012 09:17:02 UTC+5:30, tangledweb wrote: > If I already have Sheets(RawData).Cells(count, BarDate).Text having a > value like 6/26/2012 is there a way to get the day of the week as a nu

$$Excel-Macros$$ Re: Delete Blank Cells.xlsx

2012-06-26 Thread Lalit_Mohan
Hi Vishwa, I forgot to mention in my last post, use this code in existing file in which weekend date deletion code already exist. just apply the blank row deletion procedure and use it as i show you. Regards, Lalit Mohan On Wednesday, 27 June 2012 00:46:00 UTC+5:30, Viswanathan Yoganathan

$$Excel-Macros$$ Re: extract list of values based on criteria using formula

2012-06-26 Thread Lalit_Mohan
Dear Hilary Try this in column O4 =IF(LARGE(($L$3:$L$21>=IF($K$23 = "",$L$23,$K$23))*(IF($K$23="",TRUE,$L$3:$L$21 <=$L$23))*($L$3:$L$21),ROW($A1)) = 0, "", LARGE(($L$3:$L$21>=IF($K$23 = "",$L$23,$K$23))*(IF($K$23="",TRUE,$L$3:$L$21 <=$L$23))*($L$3:$L$21),ROW($A1))) it's an array formula

$$Excel-Macros$$ Re: Delete Blank Cells.xlsx

2012-06-26 Thread Lalit_Mohan
Hi Vishwa, Sub DeleteBlank() On Error Resume Next ActiveSheet.UsedRange.SpecialCells(xlCellTypeBlanks).EntireRow.Delete On Error GoTo 0: On Error GoTo -1: Err.Clear End Sub Above is the function need to call in the button click event in sheet1 as shown below. Private Sub CommandBut

$$Excel-Macros$$ VBA editor auto-deletes spaces at the ends of lines

2012-06-26 Thread Lalit_Mohan
Today i faced an issue with excel 2010. if u have installed Visual Studio 2010 beta2 then VBA editor auto-deletes spaces at the ends of lines so below are the steps which helps me to resolve this. 1. Click the Microsoft Office Button, and then click Excel Options 2. Click the Add-Ins cate

$$Excel-Macros$$ Re: Rajan Verma - Most helpful Member(May'12)

2012-06-03 Thread Lalit_Mohan
Congratulation Rajanonce again you rock... Regards, Lalit Mohan On Sunday, 3 June 2012 23:12:31 UTC+5:30, Ayush Jain wrote: > Hello Everyone, > > Rajan Verma has been selected as 'Most Helpful Member' for the month of > May'2012 > He has posted 147 posts in May 2012 and helped many peop