excel-2010

how to keep the first cell always active in excel using vba

我们两清 提交于 2019-12-02 16:09:29
问题 How to keep the first cell always active when opening the excel sheet. Can any one guide me to how to this. This is my code: Private Sub Send_Click() Dim strURL As String strURL = "http://xxxxxxxxxxxx.com/excelAPI.php?customer_id=1&mobilenumber=" _ & ActiveCell.Value & "&message=" & ActiveCell.Offset(0, 1).Value Call Sheets("Sheet1").WebBrowser4.Navigate(strURL) End Sub 回答1: I'm not quite sure why you would want the first cell to be active. If it's just because you are using ActiveCell in

How to apply conditional formatting for only visible cells?

依然范特西╮ 提交于 2019-12-02 15:16:11
问题 I am using Excel-2010, I have applied 3scale conditional formatting for Excel range A1:F100, on a Dropdown macro hide/unhide will be actioned, and hide/unhide is not sequential, for eg:- Rows 1,10,30,54,67,88 may only visible. So for only these visible rows, the same conditional format should Work. I have tried browsing to find it, but i couldn't get the required. Help is much Appreciated. Thanks in advance. 回答1: As commented, it should be something like this: Sub ject() Dim rng As Range With

Freezing Row 1 and Column A at the same time [closed]

流过昼夜 提交于 2019-12-02 14:20:16
I want to "freeze" Row 1 and Column A simultaneously in Excel 2010. Is this possible? Select cell B2 and click "Freeze Panes" this will freeze Row 1 and Column A. For future reference, selecting Freeze Panes in Excel will freeze the rows above your selected cell and the columns to the left of your selected cell. For example, to freeze rows 1 and 2 and column A, you could select cell B3 and click Freeze Panes. You could also freeze columns A and B and row 1, by selecting cell C2 and clicking "Freeze Panes". Visual Aid on Freeze Panes in Excel 2010 - http://www.dummies.com/how-to/content/how-to

How to autogenerate certain excel strings from certain inputs as given in example?

孤者浪人 提交于 2019-12-02 13:43:51
Basically I want the following in excel: I need that, if I Input following in Sheet 1: A B C 1 Name Size Color 2 Shirt S,M,L Red, Green 3 Trouser 32,34 White, Black, Grey The following output automatically generates in Sheet 2: A B C 1 Name Size Color 2 Shirt-S-Red S Red 3 Shirt-M-Red M Red 4 Shirt-L-Red L Red 5 Shirt-S-Green S Green 6 Shirt-M-Green M Green 7 Shirt-L-Green L Green 8 Trouser-32-White 32 White 9 Trouser-34-White 34 White 10 Trouser-32-Black 32 Black 11 Trouser-34-Black 34 Black 12 Trouser-32-Grey 32 Grey 13 Trouser-34-Grey 34 Grey Basically, the all the child rows should be

Re-order Excel Sheets based on Sheet names via a macro

半世苍凉 提交于 2019-12-02 13:09:24
If I have 6 sheets in my excel document named and arranged in this sequence : O1, O2, O3, O1_#2,O2#2,O3#3 Will it be possible to write a macro to change the sequence of these sheets? This is the sequence I am looking for: O1, O1#2, O2, O2#2, O3, O3#2 Thanks If I understand you correctly, you need to sort sheets in alphabetical order: Sub SortSheets() Dim shNames As Collection Dim i As Long, j As Long Dim temp As String Dim sh As Worksheet Set shNames = New Collection 'add sheet names in collection For Each sh In ThisWorkbook.Worksheets shNames.Add sh.Name, sh.Name Next sh 'bubble sort For i =

Formatting List of Text Strings in Excel

邮差的信 提交于 2019-12-02 12:16:00
I am trying to turn the font to red for the occurrences of a list of words in excel. So far, I am able to find a single word, but I need to search for a whole array. I am a newbie with VBA and struggling. So far, I've been able to find this as a solution, but it deals with finding a single string, "F1": Sub test4String2color() Dim strTest As String Dim strLen As Integer strTest = Range("F1") For Each cell In Range("A1:D100") If InStr(cell, strTest) > 0 Then cell.Characters(InStr(cell, strTest), strLen).Font.Color = vbRed End If Next End Sub Edit: The cells I need highlighted have the items

Remove “Save & Send” from File menu in Excel 2010 using custom XML

夙愿已清 提交于 2019-12-02 12:03:34
Could someone please help me modify the following XML code (Office 2007) so that it works in Office 2010? I've included my XML from Office 2007 below: <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon> <officeMenu> <menu idMso="FileSendMenu" enabled="false"/> <menu idMso="FileEmailAsPdfEmailAttachment" enabled="false"/> <menu idMso="FileEmailAsXpsEmailAttachment" enabled="false"/> <menu idMso="FileSendAsAttachment" enabled="false"/> </officeMenu> </ribbon> I canNOT figure out why my schema isn't working. It doesn't help that I know nothing about XML and I'm just

Identify Duplicates or COUNTIF > 255 characters (long text)

走远了吗. 提交于 2019-12-02 11:06:37
问题 I have a strange problem, I have an excel document with two columns, col A contains the key, this is not unique, col b contains text of varying length, usually above 255 characters. I'd like to apply a filter to column A to select two keys, this is fine, I'd then like to identity any duplicates that exists within column B - applying only to fields that are visible, i.e. as a result of the filter on column A. This should be simple; however, the conditional formatting is failing to identify

Round Up the value to lowest in microsoft excel

放肆的年华 提交于 2019-12-02 10:26:06
I am writing a formula in excel in which I am diving 2 numbers and I don't want value in decimal. I tried using ROUND(5/10,0) but it round of 0.5 to 1. But my requirement is (0-0.99) should be evaluated as 0. Similarly (2-2.990 should be evaluated as 2. E.g. (5/10) - 0 (output) (15/10) - 1 (output) (25/10) - 2 (output) Thanks in Advance. shove You can use the function ROUNDDOWN . Example: ROUNDDOWN(15/10,0) The second parameter stands for the precision. Zero means that you won't have any decimal numbers. You can use INT to find the next lower integer. =INT(5/10) gives 0 =INT(15/10) gives 1

Find all and delete in VBA

别等时光非礼了梦想. 提交于 2019-12-02 10:13:34
I am looking for a way to find all - in a column in VBA, store them or and delete the rows? Here is what I can use to find and delete a single row. But I need to find all of the dashes. Dim A as Long Columns("C:C").Select Selection.Find(What:="-", After:=ActiveCell, LookIn:=xlValues, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate A = ActiveCell.Row Range(A).Delete I thought about a loop but I don't know how many times to run the iteration as the number of dashes will vary. Any suggestions would be appreciated. Thanks,