Search Results

Search found 4783 results on 192 pages for 'excel vba'.

Page 84/192 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • Access VBA remove CR & LF only from the beginning of a text string by searching for them

    - by uZI
    Hi there I need to remove line breaks from the beginning of a memo type records. I dont want to use the replace function as it would remove all line breaks from the record which is not desired. Its only the line breaks at the beginning of the field that I am interested in removing. Furthermore, the my records do not always begin with a line break so I cant really use text positioning, the solution would be to look for line break at the beginning instead of always expecting it at the beginning. click here for a sample of what my data looks like any help will be greatly appreciated

    Read the article

  • How do I correctly use two Not Exists statements in a where clause using Access SQL VBA?

    - by Bryan
    I have 3 Tables: NotHeard,analyzed,analyzed2. In each of these tables I have two columns named UnitID and Address. What I'm trying to do right now is to select all of the records for the columns UnitID and Address from NotHeard that don't appear in either analyzed or analyzed2. The SQL statement I created was as follows: SELECT UnitID, Address INTO [NotHeardByEither] FROM [NotHeard] Where NOT EXISTS( Select analyzed.UnitID FROM analyzed WHERE [NotHeard].UnitID = analyzed.UnitID) or NOT EXISTS( Select analyzed2.UnitID FROM analyzed2 WHERE [NotHeard].UnitID = analyzed2.UnitID) Group BY UnitID, Address I thought this would work since I've used the single NOT EXISTS subquery line and it has worked just fine for me in the past. The above query however returns the same data that is in the NotHeard table whereas if I take out the or NOT EXISTS part it works correctly. Any ideas as to what I'm doing wrong or how to do what I'm wanting to do?

    Read the article

  • Access VBA: How to test if recordSet is empty? isNull?

    - by Shubham
    How can you test if a record set is empty? Dim temp_rst1 As Recordset Dim temp_rst2 As Recordset Set temp_rst1 = db.OpenRecordset("SELECT * FROM ORDER_DATA WHERE SKUS_ORDERED = '" & curSKU1 & "' AND [ORDER] = " & curOrder) Set temp_rst2 = db.OpenRecordset("SELECT * FROM ORDER_DATA WHERE SKUS_ORDERED = '" & curSKU2 & "' AND [ORDER] = " & curOrder) If IsNull(temp_rst1) Or IsNull(temp_rst2) Then MsgBox "null" I'm opening up a couple of record sets based on a select statement. If there are no records, will IsNull return true?

    Read the article

  • VBA: How to trigger a worksheet event function by an automatic cell change trough a link?

    - by Jesse
    Hi, My problem is the following: The function below triggers an "if then function" when i manually change the value in cell D9. What should I do to get it to work with an automatic value change of cell D9 trough a link. In other words if i where to link cell D9 to cell A1 and change the value of A1 can i still make the function below work? Thanks in advance Private Sub Worksheet_Change(ByVal Target As range) If Target.Address = "$D$9" Then If range("C12") = 0 Then Rows("12:12").Select Selection.RowHeight = 0 Else: Rows("12:12").Select Selection.RowHeight = 15 End If End Sub

    Read the article

  • If file contains certain text, how can I extract a string from the file and input it into a cell? (VBA)

    - by Kristina Kotonika
    Say I have the following path and file name: P:\Actuary\Cash Flow Forecast\Annual and Quarterly Budget Data\ECMQA 2012Q1.xls I want to write an if then statement that does the following (not sure if my statement is set up properly): If InStr(1, "P:\Actuary\Cash Flow Forecast\Annual and Quarterly Budget Data\ECMQA 2012Q1.xls", "QA", vbTextCompare) > 0 Then BD.Sheets("Sheet1").Range("C2").value = "2012Q1" End If Instead of just inputting "2012Q1", I want it to automatically read this from the file. The thing is I am actually looping through 12 or so files and there's two types, "ECMQA 2012Q1.xls" (or ECMQB 2012Q2.xls and so on) AND "ECM Annual Budget 2012.xlsx" If my file is the annual one (If file contains "Annual"), then I want: BD.Sheets("Sheet1").Range("C2").value = "2012" And i want it to read this from the actual file, same as the other one...not me putting in "2012" Is there a way to do this? Any help will be appreciated!

    Read the article

  • I need to rename a file in VBA, but getting "File Not Found" when it's clearly there!

    - by Karl
    Help! I'm getting a File Not Found error when trying to rename a file w/a variable. The variable is string. I can look at the variable and it's the exact filename that is there, but when I run the code, it says not found! Dim filePath, fileName, absPath, newPath As String filePath = "P:\Automated\" fileName = MySite.GetResult absPath = filePath & fileName newPath = "P:\Automated\NEW.csv" 'The following is a rename from CuteFTP Pro COM Object: '(Getting the same result from this and the below "Name". 'MySite.LocalRename "P:\Automated\" & fileName, "P:\Automated\NEW.csv" Name absPath As newPath

    Read the article

  • Excel I have a .Net object compiled as a tlb but cant not access any methods apart from Dispose.

    - by Mark O'Grady
    Hi This is ongoing issue to something I posted yesterday. I have a .net object that I want to use in Excel. I have an existing VBA script that i need to alter to call this the object from. I have then converted the object to a TLB. I've not really touched on this area before so any help will be appreciated. I have created an interface [Guid("0F700B48-E0CA-446b-B87E-555BCC317D74"),InterfaceType(ComInterfaceType.InterfaceIsDual)] [ComVisible(true)] public interface IOfficeCOMInterface { [DispId(1)] void ResetOrder(); [DispId(2)] void SetDeliveryAddress(string PostalName, string AddressLine1, string AddressLine2, string AddressLine3, string AddressLine4, string PostCode, string CountryCode, string TelephoneNo, string FaxNo, string EmailAddress); } I have also created an class that inherits that object. [ClassInterface(ClassInterfaceType.None), ProgId("NAMESPACE.OfficeCOMInterface"), Guid("9D9723F9-8CF1-4834-BE69-C3FEAAAAB530"), ComVisible(true)] public class OfficeCOMInterface : IOfficeCOMInterface, IDisposable { public void ResetSOPOrder() { } public void SetDeliveryAddress(string PostalName, string AddressLine1, string AddressLine2, string AddressLine3, string AddressLine4, string PostCode, string CountryCode, string TelephoneNo, string FaxNo, string EmailAddress) { try { SalesOrder.AmendDeliveryAddress(PostalName, AddressLine1, AddressLine2, AddressLine3, AddressLine4, PostCode); MessageBox.Show("Delivery address set"); } catch (Exception ex) { throw ex; } } } I can't access the object methods apart from dispose, I guess IDisposable is working fine. Is there anything I need to my Interface?

    Read the article

  • What are possible suffixes after variable name in VBA?

    - by archimed7592
    As I've already figured out, there is at least six of them: !@#$%&. Here is snip: Dim A!, B@, C#, D$, E%, F& Debug.Print "A! - " & TypeName(A) Debug.Print "B@ - " & TypeName(B) Debug.Print "C# - " & TypeName(C) Debug.Print "D$ - " & TypeName(D) Debug.Print "E% - " & TypeName(E) Debug.Print "F& - " & TypeName(F) Outputs A! - Single B@ - Currency C# - Double D$ - String E% - Integer F& - Long Where is documentation on this syntax sugar? What other possible suffixes are there? Is there one for Date?

    Read the article

  • Referencing An Object From ThisWorkbook

    - by Soo
    I need to populate several comboboxes in an Excel sheet upon loading it. I have the Workbook_Open() event set up on my ThisWorkbook code sheet in my VBA Editor. Now that the code isn't in my Sheet1 code sheet in my VBA Editor, the following code doesn't work: ComboBox.AddItem "hulkSMAASH!" How can I reference this combobox from my ThisWorkbook code sheet in my VBA Editor?

    Read the article

  • Is object clearing/array deallocation really necessary in VB6/VBA (Pros/Cons?)

    - by Oorang
    Hello, A lot of what I have learned about VB I learned from using Static Code Analysis (Particularly Aivosto's Project Analyzer). And one one of things it checks for is whether or not you cleared all objects and arrays. I used to just do this blindly because PA said so. But now that I know a little bit more about the way VB releases resources, it seems to me that these things should be happening automatically. Is this a legacy feature from pre VB6, or is there a reason why you should explicitly set objects back to nothing and use Erase on arrays?

    Read the article

  • The Excel Column Name assigment problem

    - by Peter Larsson
    Here is a generic algorithm to get the Excel column name according to it's position. By changing the @Base parameter, you can do this for any sequence according to same style as Excel. DECLARE @Value INT = 8839,         @Base TINYINT = 26   ;WITH cteSequence(Value, Delta, Quote, Base, Chr) AS (     SELECT  CAST(@Value AS INT) AS Value,             CAST(1 AS INT) AS Delta,             CAST(@Base AS INT) AS Quote,             CAST(@Base AS INT) AS Base,             CHAR(65 +(@Value - 1) % @Base) AS Chr       UNION ALL       SELECT  Value AS Value,             Quote AS Delta,             26 * Quote AS Quote,             Base AS Base,             CHAR(65 +((Value - Delta)/ Quote - 1) % Base) AS Chr     FROM    cteSequence     WHERE   CHAR(65 +((Value - Delta)/ Quote - 1) % Base) <> '@' ) SELECT  CAST(Msg AS VARCHAR(MAX)) FROM    (             SELECT        '' + Chr             FROM        cteSequence             ORDER BY    Delta DESC             FOR XML        PATH('')         ) AS x(Msg)

    Read the article

  • Cloudcel: Excel Meets the Cloud

    - by kaleidoscope
    Cloudscale  is launching Cloudcel Cloudcel is the first product that demonstrates the full power of integrated "Client-plus-Cloud" computing. You use desktop Excel in the normal way, but can also now seamlessly tap into the scalability and massive parallelism of the cloud, entirely from within Excel, to handle your Big Data. Building an app in Cloudcel is really easy – no databases, no programming. Simply drop building blocks onto the spreadsheet (in any order, in any location) and launch the app to the cloud with a single click. Parallelism, scalability and fault tolerance are automatic. With Cloudcel, you can process realtime data streams continuously, and get alerts pushed to you as soon as important events or patterns are detected ("Set it and forget it"). Cloudcel is offered as a pay-per-use cloud service – so no hardware, no software licenses, and no IT department required to set it up. Private cloud deployments are also available. Please find below link for more detail : http://billmccoll.sys-con.com/node/1326645 http://cloudcel.com/ Technorati Tags: Tanu

    Read the article

  • Is there a way to have "default" or "placeholder" values in Excel?

    - by Iszi
    I've got a spreadsheet with cells that I want to be user-editable, but that I also want to have "default" or "placeholder" values in, whenever there is no user-entered data. There's a couple good use cases for this: Prevent formula errors, while providing reasonable assumptions when a user has not entered (or has deleted) their own value. I could use conditional formatting to alert the user to default values, so as to prevent their ignorance of them - they can then make an informed choice as to whether that value is still appropriate or not for the intended calculations. Give a short description of what is intended to be entered in the cell, without having to have a separate "instructions" segment or document. This would also eliminate the need for a nearby "Label" cell, in some cases where it's really not appropriate. To accomplish what I want, I need some formula, script, or other advanced spreadsheet option that will do the following: Show the default value in the cell before user enters data. Allow the default value to be found by any formulas referencing the cell, when there is no user-entered data in that cell. Allow the user to freely (naturally, exactly as they would do with any "normal" cell) overwrite the displayed value with their own value or formula, and have the user-entered data found by any formulas referencing the cell. When cell is blanked by deletion of user input, revert to default value. Is there a way to do this in Excel, or am I asking too much of a spreadsheet program here?

    Read the article

  • ms excel 2010 in windows xp - when open workbook the data is formatted differently than when i saved it

    - by Justin
    I haven't been able to find an answer to this. I have multiple files that I use regularly in excel that now have cell formats of "date". Every single cell in the entire workbook (all sheets) is now formatted as "date". The problem is that I lost my formatting for percents, numbers years, etc and now everything is converted to date (xx/xx/xxxx). I am able to open previously saved versions of a file (prior to me having the problem) and the cells are formatted as I intend them to be (percents, numbers, general, as well as dates). Since this has happened on a couple different files recently, I am wondering how this is happening and how do I prevent it from happening in the future. I cannot cure the problem just by highlighting the entire sheet and converting back to general because I lose all my percents and number formatting. Example (Correct formatting): Month Year Working Days MTD POS Curr Rem May 2012 22 0 1,553,549 June 2012 22 0 1,516,903 June 2011 22 0 1,555,512 June 2010 22 0 1,584,704 Example (Incorrect formatting): Month Year Working Days MTD POS Curr Rem June Tuesday, July 04, 1905 Wednesday, January 04, 1900 Wednesday, January 18, 1900 213,320 July Tuesday, July 04, 1905 Wednesday, January 04, 1900 Monday, January 16, 1900 314,261 July Monday, July 03, 1905 Wednesday, January 04, 1900 Sunday, January 15, 1900 447,759 July Sunday, July 02, 1905 Wednesday, January 04, 1900 Monday, January 16, 1900 321,952 Sorry for the mess. Any suggestions?

    Read the article

  • Conditional formatting Excel 2007/2010: Highlight the first cell in the row that contains duplicate values?

    - by Nancy Prades
    I have a table with hundreds of columns and rows of data; each row and column have a header. For instance, column headers are ITEM, FILE1, FILE2, FILE3, etc. and row headers are AA, BB, CC, DD, and so on. Under conditional formatting, I used "Highlight Cells Rules" "Equal to", in order to highlight cells that have values equal to the value in another cell. In this case, my formula rule is: Rule: Cell Value = $A$1 Applies to: =$B$3:$G$8 When I input "X" into cell A1, Excel will highlight all of the cells that have a value equal to "X", in this case, the following cells are highlighted: B3, C5, G6, and E8. Here's my problem. The data that I am working with contains more than 100 columns and rows. I want to identify all of the ITEMS (AA, BB, CC, etc.) that contain the duplicate file "X". In order to do this I have to scroll right to left, and up and down. Here's my question. Is there a way to use conditional formatting to add an additional rule? I want to keep the current rule, but I also want the row header to be highlighted if any of the cells in that row contain a value equal to "x". In this case, I want AA, CC, DD, and FF to also be highlighted. Is this possible? I've spent days trying to figure this out - and no luck. Any help would be appreciated! :) Nancy A B C D E F G 1 X 2 ITEM FILE1 FILE2 FILE3 FILE4 FILE5 FILE 6 3 AA x t y u d w 4 BB r y a b k d 5 CC y x f u i g 6 DD t v b d f x 7 EE e w y s l n 8 FF w u n x e m

    Read the article

  • export google search results to excel [closed]

    - by Om23
    I want to make a program/script that will be able to take the data from the excel spreadsheet in column A (for example, "team 123") and search Google and take the first 3 results from Google and put the data into the excel spreadsheet. I don't have that much experience in programming. So what language should I use? I know I have to use REST in the Google custom search API- how would I incorporate this? This might have been done before but all I've been able to find is scripts on how to export all the search results or the number of search results, not the first 3 search results. Thanks. If you know better tags for this post please let me know.

    Read the article

  • Is there a C# library that will perform the Excel NORMINV function?

    - by Portman
    I'm running some Monte Carlo simulations and making extensive use of the Excel function NORM.INV using Office Interrop. This functions takes three arguments (probability, average, standard deviation) and returns the inverse of the cumulative distribution. I'd like to move my code into a web app, but that will require installing Excel on the server. Does anybody know of a C# statistics library that has an equivalent function to NORM.INV?

    Read the article

  • Is there a code-generator to create DataTable definition block from Excel Work sheet?

    - by burak ozdogan
    Hi, Basically the thing I want to achieve is to have a data-table that I want to use in my unit tests. And when I run my unit tests, I do not want to read any excel file into a data-table -or any call to Db-. So, I would like to have method that returns a data-table with the values that I can use in my test. Is there already any written tool to read an excel sheet and generate a code that defines an ADO.Net DataTable? Thanks, burak ozdogan

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >