Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Infragistics Excel formula Query
posted

Hi,

We are using Infragistics Excel control, facing some issue how to copy First row formulas to all other rows with cell increment eg.

First Row formulas

K1=IF(D1="96","",A1)    L1=IF(D1="96","",B1) ,etc.,

same apply to 

K-L column copy for all rows having 1046 rows. formula should change all cell with row id eg K2 should have

K2=IF(D2="96","",A2)    L2=IF(D2="96","",B2) ,etc.,

Note: please share code sample with VB.net

Thanks,

Kumaran Krishnamurthi

  • 34330
    Offline posted

    Hello Kumaran,

    There does not exist a built-in way to copy a formula to each row of a Worksheet with a cell increment, but this behavior could be easily achieved using a loop. For example, the following code would achieve one of your “IF” formulas for the first 1046 cells:

            Dim workbook As Workbook = New Workbook(WorkbookFormat.Excel2007)
            Dim sheet As Worksheet = workbook.Sheets.Add("Sheet1", SheetType.Worksheet)
    
            For i As Integer = 1 To 1046 - 1
                Dim cell As WorksheetCell = sheet.GetCell("K" & i.ToString())
                Dim formulaString As String = "=IF(D" & i.ToString() & "=" & """96""" & "," & """""" & ",A" & i.ToString() & ")"
                cell.ApplyFormula(formulaString)
            Next

    I hope this helps you. Please let me know if you have any other questions or concerns on this matter.

  • 0
    Offline posted

    All are welcome, I'd like to say. I'm a new user; maybe you can help. retro bowl I had a great time reading your content and found it to be really beneficial.

  • 0
    Offline posted

    USA Network is an American primary cable channel  Usanetwork.com

  • 0
    Offline posted

    With different materials to choose from, there’s a tea kettle out there for everyone. So, next time you make yourself a cup of tea, consider using a tea kettle and see how it enhances your experience. https://myteakettle.com/best-camping-kettle/

  • 0
    Offline posted

    To create Power Query formulas in Excel, you can use the aurora store Editor formula bar, or the Advanced Editor. The Query Editor is a tool included with Power Query that lets you create data queries and formulas in Power Query. The language used to create those formulas is the Power Query Formula Language.

    To reference a cell or range of cells in another worksheet in the same workbook, put the worksheet name followed by an exclamation mark (!) before the cell address. For example, to refer to cell A1 in skyline emu apk, you type ffh4x apk. For example, to refer to cells A1:A10 in Sheet2, you type Sheet2!A1:A10.21