$$Excel-Macros$$ Re: Conditional Formats on Cells

2009-04-21 Thread rspowell
Steve -- Excel 2003 is limited to 3 conditions -- since you are talking about 5 or 6 conditions, you must be working in Excel 2007, without these same limitations Probably, your 6th rule is present - but, the Conditional Formatting Rules Manager dialog is only large enough to display 5 rules

$$Excel-Macros$$ Re: LEARNING EXCEL

2009-04-15 Thread rspowell
Rahul -- There is an area on my web site to help you begin ... Getting to Know VBA www.beyondtechnology.com/vba.shtml -- particularly for you ... Beyond that, I can recommend anything written by John WALKENBACH ... he does an excellent

$$Excel-Macros$$ Re: assigning a macro to function keys (F1,F2,...)

2009-04-06 Thread rspowell
This example will assign "MyProcedureName" to the F2 key ... Application.OnKey "{F2}", "MyProcedureName" ... you may also want to know how to restore the normal keyboard function Application.OnKey "{F2}" ... just leave off the procedure Hope it helps you ! - Rodney POWELL [ Micro

$$Excel-Macros$$ Re: run time ERROR 9

2009-04-01 Thread rspowell
Shrinivas -- My guess is that the Excel sheet you are trying to reference is either misnamed or does not exist When the error appears, click the Debug button -- this will take you to the offending line of code in the VB Editor This will enable you do identify the cause of the error Hope it he

$$Excel-Macros$$ Re: excel mind of it's own

2009-03-31 Thread rspowell
Hello Friend -- If I'm understanding that you do not want to sort the header (Row 1), ... just when you call the Sort dialog in Excel 2003, ensure the optionbutton control near the bottom labeled 'Header Row' is selected If you are working in Excel 2007 - instead it's a checkbox in the upper-r

$$Excel-Macros$$ Re: Modifying the contents of a cell in a range in excel

2009-03-28 Thread rspowell
Hello Friend -- You need a subroutine to change the range ... Sub ChangeCells(theRange As Range) theRange.Cells(1,1) = "Hello World" End Sub ... this will work fine Hope it helps you ! - Rodney POWELL [ Microsoft MVP - Excel, 1997-2009 ] www.BeyondTechnology.com On Mar 28, 1

$$Excel-Macros$$ Re: Getting Run-time error 13 Type Mismatch by VBA Macro

2009-03-28 Thread rspowell
There are a couple of ways you can approach this ... Possible Solution # 1 - If your criteria must be hardcoded in the VBA procedure then ... Select Case Selection.Cells(x&, 8).Value Case "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS"

$$Excel-Macros$$ Re: selection of value if it matches a condition

2009-03-27 Thread rspowell
Praveen -- If you must use VBA, you can adapt some variation of the following procedure ... Sub Reliance_Buy() Dim r&, LastRow&, Cnt& With Sheet1 LastRow& = 9 For r& = 1 To LastRow& If .Cells(r&, 1).Value = "Reliance" And _ .Cells(r&, 2).Value = "Bu

$$Excel-Macros$$ Re: Userform object precedence

2009-03-20 Thread rspowell
On Mar 20, 8:08 am, Damascus wrote: > Hi everyone. > > I am creating a macro that incorporates a userform. It is functional > and in use, but there is a small thing that is still a problem. For > some background, there are 2 sets of 2 textboxes for entering data, > along with an 'enter' command

$$Excel-Macros$$ Re: Repeated Value in a Column

2009-03-18 Thread rspowell
Gohar -- Let's say you are evaluating Column A -- you can use something like the following formula in Column B =IF(COUNTIF(A:A,A1)>1,"repeated","not repeated") ... just enter this in B1 and copy it down Hope it helps you ! - Rodney POWELL Microsoft MVP - Excel www.BeyondTechnology.com

$$Excel-Macros$$ Re: macro to reference a different workbook

2009-03-16 Thread rspowell
Sub OtherWorkbook() Dim WorkbookName$ Dim varValue As Variant ' Variable for the workbook name ' -- or you can make this an array of names WorkbookName$ = "MyWorkbook.xls" ' Variable for a value from Sheet1 of that workbook ' -- in this example, gets a value from range "B2" va