Alternative formulas for vba script - excel

I made a VBA function which turns my raw data into a table format since I want to use a pivottable for charts. The problem is that my file need to run on excel online and VBA is not running in a cloud environment.
Is there a way to do this with functions/power query/...
Thanks in advance

Took a while but i managed. It is in fact Excel online compatible Each formula is displayed above the corresponding column. I added some data to make sure it could handle extra data.
=IF(F8<>"",ROWS($G$7:G7),NA#)
=AGGREGATE(15,6,$G$8:$G$32,ROWS($G$7:G7))
=IF(ISNUMBER(H8),IF(ISTEXT(INDEX($B$6:$C$32,H8,1)),INDEX($B$6:$C$32,H8,2),I7),"")
=IF(ISNUMBER(H8),IF(ISTEXT(INDEX($C$7:$D$32,H8,1)),INDEX($C$7:$D$32,H8,2),J7),"")
=IF(ISNUMBER(H8),INDEX(E$8:E$32,$H8),"")
=IF(ISNUMBER(H8),INDEX(F$8:F$32,$H8),"")

Related

Export SSRS Report to Excel but then add formulas and formatting to create a worksheet that users can add own data (Power Automate?)

I have created a report in SSRS that is several tables. I can export the report to Excel easily enough but the users want to have the ability to input their own numbers in a line below the tables. This line (y) would be followed with another summary line(y+z, or x-y=z, whatever). Yes, they can open the report insert extra lines, add formulas and formatting... but since this report will be run monthly and there are 11 tables in this report it would be nice if there is a Power Automate solution to add lines, formulas and formats or some other solution. Feel free to post potential solutions or teaching resources that may allow me to piece together a solution. Thank you.
I haven't tried anything yet. The only solution I can do at the moment is create a Excel template where I paste the exported spreadsheet and it gets 'lookedup' by a second tab with the proper/end formatted spreadsheet. Would like to modernize the solution(and learn)....although learning VBA is not solution I am looking for....

Excel formula without open worksheet

I have one report which is all time updated and changed the file name. I want to know is it possible to make a formula (Except for Mecro code) to another worksheet without open this worksheet.
I am using indirect formula but it required to open worksheet.
Both of these sources indiciate that this cannot be done with a formula alone. However, they propose workaround solutions using vba code, as well as this stackoverflow answer
I strongly recommend to use PowerQuery. Though it uses M language, you can use it with GUI. If your version of Excel is prior than 2013, you must install the addon

How to copy content from a excel table to another worksheet

I have a table (named as Logs) in Sheet1 to which I am writing through a program. I need to copy the content written to the table Logs to Sheet2 as LogReport when I open the workbook. Is it possible to do this without using macros or Power Query option in Excel. I am working with Excel 2010. I have been searching for a while, but I was unable to find a solution which match the requirement.
Looked through the functions available as well, but I was unable to find a possible solution. Appreciate if I can get some help.
"Is it possible to do this without using macros?"
If under "macros" you mean VBA then the answer is No.

Loss of number/date formatting when linking MS Excel files to MS Access

Hi and thanks in advance for the help.
I have an Access 2007 database that has tables created by live links to several Microsoft Excel 2010 spreadsheets.
I have several Access macros that run queries against these linked tables, and I find that the formatting of the output is in very strange formatting if I run the macros, without first having those linked Excel spreadsheet files open.
To put it another way, if I open the linked spreadsheets and run the Access macros, all the data formats correctly, but if I have the linked Excel spreadsheets closed when I run my Access macros, the formatting goes all funny - particularly with date fields.
Can anyone offer any advice on how I can resolve this problem?
Many thanks
Kim
I usually create a straight select query for each linked Excel table.
In this you can force any formatting or conversion you may need as well as using alias to obtain more friendly field names.
Then use this query and not the linked table for the further processing.

SSRS export to Excel UNFORMATTED

I'm looking into SSRS with intention of exporting a lot of the reports to excel. The problem is that when you export it changes cell sizes and removes borders to try and keep the original report format.
Is there anyway to stop this happening? So that the report exports to excel with the "usual" excel formatting? If it requires any coding that's fine as most of my reports will be run from C# code.
Thanks
Mat
You could export to a CSV and import that into a spreadsheet, possibly with some sort of template sheet for the particular report.
You could export the data to Sheet2. Mark sheet 2 as hidden.
Create your designer report on Sheet1.
Run an Excel Macro to read data from Sheet2 and put on Sheet1.
It's not pretty, but you could consider generating Excel sheets from the XML renderer, as described here - this would give you full control over the appearance of the worksheet.
I think what's happening is that you have stacks of fields in your reports that aren't aligned with each other and so when you export to excel, it compensates and generates extra columns to try to come close to what you report looks like.
I used to get this all time and then I figured out that if you used as little tables as possible while using more grouping within that grid, it goes along way to send a clean format to excel. Also watch out if you use a report header whose ends don't align to columns within the report.
So match object's begin and ends with other objects' or span of cells' begins and ends.
I create a seperate report with the same data, but no formatting.
Include a button to export on the main report, and when they click it, it directs them to an unformatted version of the report that is automatically exported to Excel.

Resources