Stack Overflow Questions » Excel
539 FOLLOWERS
Need help in Excel programming? Ask anything about excel objects or files, or complex formula development, this online community for developers is here to assist. Stack Overflow empowers the world to develop technology through collective knowledge.
Stack Overflow Questions » Excel
15m ago
I am using an excel macro for Dymola simulation. It worked well with Dymola 2020x or 2022x. After upgrading it to 2024x, this excel tool doesn't work. I created simple dymola model and excel macro like this.
//Dymola model
model Unnamed2
parameter Real x=1;
Real y;
equation
y=2*x;
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end Unnamed2;
//Excel macro
Sub ExcelMacro()
Cells(1, 1) = Application.DDERequest(Application.DDEInitiate("dymola", "xxx"), "ModelicaString:x")
End Sub
If I run excel macro after ..read more
Stack Overflow Questions » Excel
3h ago
Friends, I have a file that when opened, connects to a site and the table in the first sheet is automatically updated (once a day). In the columns after this table, I wrote formulas that perform calculations according to the data in the table and output and return. The problem is that when the length of the new day table is longer than the old table, it seems to be added between the lines. So that the addresses of the formula in the next cells of the table change. For example, if the table is loaded in column A, and we write from the first cell to the 100th cell in column B: =A1 =A2 . . . =A10 ..read more
Stack Overflow Questions » Excel
3h ago
I am trying to write a code for finding the probable repeated sequence in a column of data in Excel. This repeated sequence is not continuous and I want to find the number of this repeated sequence in all of this data series. I have prepared the below code but doesn’t work for the repeated sequence that are in this excel column but not repeated regularly. May I ask you to help me complete this code to get answer.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Read the data from Excel file
data = pd.read_excel('Data6.xlsx') # Assuming the file is named data.xlsx ..read more
Stack Overflow Questions » Excel
3h ago
First column/series is the input and second column is the required series/result/output. For example if the values in first column changes from 0,9,9,9 it will show 0,3,6,9 in second column. Another example, if the value in first column changes from 18,0,0,0, it will show 18,12,6,0 in second column. Another example, if the value in first column changes from 18,15,15,15, it will show 18,17,16,15 in second column. Want to calculate second column based on the first column using excel formula. I can only go down or up by 3 in every step. Need excel formula for the same ..read more
Stack Overflow Questions » Excel
4h ago
So I am trying to create a function, where I use a dropdown to change the language of the excel sheet displayed. My initial idea was to give cells a name and then create function which looks up the cell name in a table and then, depending on the language, an offset is applied, so that it then changes the language in a specific cell.
Private Sub Worksheet_Change(ByVal Target As Range)
'///////////////INITIATES THE LANGUAGE CHANGE AND RETURNS OFFSET
Dim strLng As String
strLng = Sheet9.Range("A1").Value
On Error Resume Next
If Target.Address = "$A$1" Then
Select Case strLng ..read more
Stack Overflow Questions » Excel
5h ago
function main(workbook: ExcelScript.Workbook) { let selectedSheet = workbook.getActiveWorksheet(); // Set range B3 on selectedSheetyour text fetching info from new sheet in same xcel selectedSheet.getRange("B3").setFormulaLocal("=IF(SAPAnalyticsReportÜbersichtKP!A2<>"",SAPAnalyticsReportÜbersichtKP!B2)"); i get error at this place }
im trying to work in excel with office scripts to fetch a value from another sheet in same workbook. If cell1 is not empty then i need cell3 value from the sheet ..read more
Stack Overflow Questions » Excel
5h ago
I'm receiving from a banking app CSV file and I can't figure out how to manage it. fgets function gives me the result below:
"2024-03-01, ""abc"", ""abc2"", 40, ""abc3"", """", """"";;
As you can see there are two semi-colons at the end, the rest is wrapped in apostrophes and then there are values with or without doubled-up double apostrophes. So I did this:
$line = fgets($file,);
$line = substr($line, 0, -5);
$line = substr($line, 1);
$line = str_replace('""', '"', $line);
$keys = str_getcsv(mb_convert_encoding($line, "UTF-8", "ISO-8859-2"), ",");
Well, it works fine, but there is probabl ..read more
Stack Overflow Questions » Excel
7h ago
I have a problem with range define in vba code that below code get me error of "Object required".
Option Explicit
Dim RowCount, ColCount, blankCount, RangeCount As Integer
Dim Rng2 as range
Sub DataWord2()
Set ExApp = CreateObject("Excel.Application")
Worksheets("Sheet4").Range("A1").Select
Set Rng2 = Worksheets("Sheet4").Range("A1")
CountCurrentRange (Rng2)
End sub
Public Function CountCurrentRange(ByVal Rng As Range) As Integer
RowCount = WorksheetFunction.CountA(Range(Rng, Range(Rng).End(xlDown)))
ColCount = WorksheetFunction.CountA(Range(Rng, Range(Rng).End(xlToRight)))
Range(Cells(Ro ..read more