Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all 88854 articles
Browse latest View live

Loop through excel data with powershell having a duplicate column

$
0
0

I'm having a very hard time for finding a solution for this. I'm having a excel sheet that looks like this

Name actiontime actiommessage

Tim  23:45 purchased goods

Tim  22:56 had dinner

Tim  20:56 watched movie

John 15:52 get out of bed

John 07:56 went to sleep

I need to separate the data like this Tim 23:45 purchased goods

Tim 22:56 had dinner

Tim 20:56 watched movie


John 15:52 get out of bed

John 07:56 went to sleep

In a separate html table for each user action and embed in a outlook mail all using the powershell. My main problem is separating data like that. This is an emergency a help would be greatly appreciated thanks in advanced.


Manipulating Excelsheet with pandas or matplotlib

$
0
0

I'm new to Python so I don't know which is the best method to do the task I have to do.

Basically I've got a Spreadsheet with my data; Date, Timestamp, and 6 columns with different particle counts in 6 different sizes. I have managed to read the sheet using pandas and then plotting it as a line graph with the matplotlib.pyplot library. This is all relatively straight forward.

However, I would like to add more lines to the plot, for each count I would like an average for the past 1000 counts.

I am unsure whether to manipulate the dataset with pandas or if there is a different more efficient way to do this. I read that you can also do this with numpy arrays... But I have no experience with either.

Here is the code I have so far:

import pandas as pd
import matplotlib.pyplot as plt

dataset = "2019-10-09-08_DATA.XLS"

dataset_all = pd.read_excel(dataset, skiprows=6, usecols=(
   "Date", "Time", "0.3um", "0.5um", "1.0um", "2.0um", "5.0um", "10.0um"))

dataset_all.plot()

print(dataset_all)
plt.show()

Here is the link to the Spreadsheet: https://drive.google.com/file/d/1GFU_wwt5KMuLkziQlEyWJMHrkV4Pta3k/view?usp=sharing

Issue getting recurring meetings from outlook to excel in vba

$
0
0

I am working on a macro to get outlook calendar data to excel. For the most part it work, however I am not getting recurring appointments or meetings. I know from this Microsoft documentation that I need to add the IncludeReferences value. It is in my code but I am still not getting those recurring meetings. Any help would be greatly appreciated, thank you!

Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetDefaultFolder(9) 'olFolderCalendar
NextRow = 2

olFolder.Items.Sort "[Start]"
olFolder.Items.IncludeRecurrences = True

With Sheets("Sheet1") 
    .Range("C1:F1").Value = Array("Project", "Date", "Timespent", "Categories") '"Location", "Categories")
    For Each olApt In olFolder.Items
        --Do Stuff--
    Next olApt
End With

How to match/move cells in column B based on column A [on hold]

$
0
0

I am using Excel 2016. I have a spreadsheet similar to the below image. How can I write a function to move cells at column B to equal cell in column A?

As you can see I have data stacked on column B

enter image description here

How do I read all the .wav audio file in one folder using information from an excel sheet in Matlab?

$
0
0

Hi I have a question for Matlab programming, I want to ask if I am using Mac OS and I have placed all my audio files in the same folder as Matlab, how do I read all the .wav audio files? I want to automate the process.

Example:

Firstly, I have an excel sheet with the audio file name and information.

Secondly, I want to extract the audio file names from the excel sheet (first column) and put it into the audioread function in MatLab.

I need to use the following audioread function.

[y,Fs]=audioread('audio1.wav');

I want to read audio1.wav and do some calculations on it. After finishing the calculation, I will proceed to read audio2.wav and do the same calculation for it. Can you teach me how to do this and show me the code for this?

Thank you.

Is there a way to determine if a specific file exists somewhere within a series of subfolders?

$
0
0

We have a series of Excel workbooks that keep a running total of past transactions for each year. These workbooks each log past transactions, one per row, across 12 worksheets, one for each month. 5-digit numbered tickets with transaction data are scanned daily and saved as .jpg files on our server, and at the end of each row in each workbook is a hyperlink that opens the saved .jpg corresponding to the logged transaction in that particular row.

Each link contains a formula that, along with VBA code that I was able to find, placed in Module1 of the workbook, determines whether or not the .jpg file being referenced actually exists on the server; if the file does exist, the link to the ticket file is displayed as normal, but if it does not exist, "MISSING" is displayed in place of the link. This is the VBA code in Module1:

Function FILEEXISTS(sPath As String)
        FILEEXISTS = Dir(sPath) <> ""
End Function

This all works fine, but I would now like to update the ticket link formula to determine if a ticket has been scanned and saved on the server as a .jpg file but is placed in the wrong subfolder. Essentially, what I need is VBA code that would determine if a dynamic (in that it will differ for each line) filename specified in the workbook exists anywhere within any subfolder of the file path on the server for a specific year, and if so, return either "true" if it does, or "false" if it does not. However, I am not experienced enough with VBA to know how to do this myself. If anyone could come up with anything I could use to accomplish this, it would be greatly appreciated. Thanks.

Page Setup Tools is Disabled - PrintPreview

$
0
0

I am running a spreadsheet that has a macro. Within this macro there is a Userform. This userform has a button that when pressed opens the print preview of data in a spreadsheet. When I execute the "PrintPreview" method, all buttons the page setup tools are disabled, as can be seen in the image below.

enter image description here

Below is the code I'm running

Private Sub Workbook_Open()
    UserForm1.Show
End Sub

The code below is inside UserForm1

Private Sub CommandButton1_Click()
Dim MySheet As Worksheet

Application.ScreenUpdating = False
Set MySheet = Worksheets("Plan3")

MySheet.Select
MySheet.Range("$A1:$AI166").Select
MySheet.PageSetup.PrintArea = "$A$1:$AI$166"

ActiveWindow.View = xlNormalView
Application.ScreenUpdating = True
Me.Hide
MySheet.PrintPreview
Me.Show
End sub

I couldn't find the reason why the Page Setup Tools buttons is disabled. Can someone help me?

Note 1: This code is inside a userform. The userform is loaded into the Workbook_Open() event.

Note 2: When I open the spreadsheet by double clicking on the file, the userform is loaded automatically. Clicking the CommandButton1 button displays the print preview screen, however the Page Setup Tools buttons is disabled.

If I open the Visual Basic editor and run the Workbook_Open(), clicking the CommandButton1 button shows the print preview screen and the Page Setup Tools buttons are enabled. That is, if the macro runs with the Visual Basic editor open the problem does not happen.

Note 3: This is only happening in the 2007 version of excel.

Note 4: I did a test by opening UserForm1 in "(vbModeless)" mode. In this case the problem did not occur. However in the application I am developing, I need to open the userform in "(vbModal)" mode.

Send e-mail automatically using excel

$
0
0

I'd like a help to finish this code.

I have a table where I have accounts with respective dates. What I want is to send an e-mail when the date in the "next day column" is less than or equal to today and then register the today date in the last day colunm and change the next day colunm to a next month date.

My final intention is to send an e-mail to notify the user when the critical day has arrived and make this as a recurrently. But I can't find a way...

I put two comments in the code below to show where I'm stuck...

What I've started is:

_____________________________________________________________

Public WrkB As Workbook
Public WrkS As Worksheet

Public Day As Range
Public Account As Range
Public LastD As Range
Public NextD As Range

Public x As Range
_____________________________________________________________
Public Sub SendEmail()

Dim servidor_smtp As String
Dim conta_autenticada As String
Dim senha_para_envio As String
Dim email_origem As String
Dim email_destino As String
Dim email_porta As Integer

Set WrkB = ThisWorkbook
Set WrkS = WrkB.Sheets("Checkouts")

Set Day = WrkS.Range("Checkouts[Day]")
Set Account = WrkS.Range("Checkouts[Account]")
Set LastD = WrkS.Range("Checkouts[LastD]")
Set NextD = WrkS.Range("Checkouts[NextD]")

With WrkS
    .Select
        For Each x In NextD
            >!!! Here i need to check in every row the dates and use to sende the notify e-mail
            Call CreateEmail
            Else
            End If
        Next
End With

End Sub
_____________________________________________________________
Sub CreateEmail()

Dim iMsg, Cdo_Conf, Flds

sch = "http://schemas.microsoft.com/cdo/configuration/"
Set Cdo_Conf = CreateObject("CDO.Configuration")

servidor_smtp = "smtp.gmail.com"
senha_para_envio = "1234"
email_origem = "excel@microsoft.com.br"
email_destino = "delivery@gmail.com"
email_porta = 465
email_assunto = "Checkout of "& Account & " coming!"
email_corpo = "You have 2 days for the checkout"

Cdo_Conf.Fields.Item(sch & "sendusing") = 2
Cdo_Conf.Fields.Item(sch & "smtpauthenticate") = 1
Cdo_Conf.Fields.Item(sch & "smtpserver") = servidor_smtp
Cdo_Conf.Fields.Item(sch & "smtpserverport") = email_porta
Cdo_Conf.Fields.Item(sch & "smtpconnectiontimeout") = 60
Cdo_Conf.Fields.Item(sch & "sendusername") = email_origem
Cdo_Conf.Fields.Item(sch & "sendpassword") = senha_para_envio
Cdo_Conf.Fields.Item(sch & "smtpusessl") = True
Cdo_Conf.Fields.Update

Set Cdo_Mensagem = CreateObject("CDO.Message")
Set Cdo_Mensagem.Configuration = Cdo_Conf

Cdo_Mensagem.BodyPart.Charset = "iso-8859-1"
Cdo_Mensagem.From = email_origem
Cdo_Mensagem.To = email_destino
Cdo_Mensagem.Subject = email_assunto

strBody = email_corpo

Cdo_Mensagem.HTMLBody = strBody
Cdo_Mensagem.Send

Set Cdo_Mensagem = Nothing
Set Cdo_Conf = Nothing

>!!! Here I need to change the dates, but I don't know how to use multiple variables to manipulate this

End Sub

How to select certain ranges for certain cases?

$
0
0

I am trying to have the user select a certain range (input, output, or p), and copy their selected cells into a new worksheet. I already have the latter half, but am having trouble creating a function to do the first part.

In short, if the user wants to see input, they will select the input "option", then my code will highlight only cells C8 through F8, and copy into a new worksheet. If they choose output, then my code will highlight only cells H8 through K8, and so on. I am new to VBA!

I have tried using an If statement and looked briefly into Case.

Dim myRange As Range
Dim inputRange As Range
Dim outputRange As Range
Dim pRange As Range

Set inputRange = Range(Range("C8"), Range("F8"))
Set outputRange = Range(Range("H8"), Range("K8"))
Set pRange = Range(Range("M8"), Range("P8"))

Trigger function in Excel after external workbook is updated or batch file is finished

$
0
0

I have an excel workbook that uses a hotkey that launches a batch file, which launches a Node script, which updates a CSV file. Technical details on that are further below.

The workbook uses the CSV file as a data source. I can manually update the Workbook with the data from the CSV file by going to Data > Refresh All > Refresh All.

Is there any way to trigger an update in the workbook once there is new data in the CSV file, or when the batch file finishes? Conceptually, I'm asking how an external event can trigger something in Excel.

Here are fine details on the process:

Flochart

When a hotkey is pressed in the Excel workbook, it launches MS console ("cmd.exe") and passes the location of a batch file to be ran and the value of the selected cell. The reason the batch file is run this way is probably not relevant to this question but I know it will be asked, so I'll explain: The batch file is to be located in the same directory as the workbook, which is not to be a hard-coded location. The problem is that launching a batch-file/cmd.exe directly will default to a working directory of C:\users\name\documents. So to launch the batch file in the same directory as the workbook, the path of the workbook is passed along to cmd.exe like so: CD [path] which is then concatenated inline with another command to launch the batch file with the value of the selected cell as an argument like so: CD [path] & batch.bat cellValue
Still with me?

The batch file then launches a Node script, again with the selected cell value as an argument.

The Node script pulls data from the web and dumps it in to a CSV file.

At this point, the workbook still has outdated data, and needs to be Refreshed. How can this be automated?

I could just start a static timer in VBA after the batch file is launched, which then runs ActiveWorkbook.RefreshAll, but if the batch file takes too long, there will be issues.

Date Differences

$
0
0

I need to create a dimension table from the current "Data Set" in order to be used in Excel and Power Bi. As for the moment the information has been saved in an excel workbook.

I've simplified a workbook to set it up as an example. Here's the Link to Download it: https://1drv.ms/x/s!AkyEWh5MlySFoWOFMTC3GDXY09eS

Currently, everything has been structured as a Pivot Table, where the column headers are dates, like so:

+----+----------+----------+----------+
| ID | 12/29/14 | 01/05/15 | 01/12/15 |
+----+----------+----------+----------+
| 00 | Darell   | Darell   | Darell   |
| 01 | Jarrod   | Annelle  | Todd     |
| 04 | Lakeesha | Linn     | Linn     |
+----+----------+----------+----------+

I've un-pivot the table and grouping the ID and name field plus calculating the minimum and maximum date value. Works like charm.

Problem comes with the last date, since this will provide me the max value for the local grouping, and in reality the last day would be one day before the next column on the original data, like so:

Here is an example:

+----+----------+----------+----------+
| ID |   Name   |   From   |    To    |
+----+----------+----------+----------+
| 00 | Darell   | 12/29/14 | 01/05/15 |
| 00 | Kamala   | 01/12/15 | ...      |
| 01 | Jarrod   | 12/29/14 | 12/29/14 |
| 01 | Annelle  | 01/05/15 | 01/05/15 |
| 01 | Todd     | 01/12/15 | ....     |
| 04 | Lakeesha | 12/29/14 | 12/29/14 |
| 04 | Linn     | 01/05/15 | ....     |
| .. | ........ | ....     | ....     |
+----+----------+----------+----------+

This is a simplified code that I've created to this:

let
Source = Excel.CurrentWorkbook(){[Name="RawData"]}[Content],

#"Unpivot [Table]" = Table.UnpivotOtherColumns(Source, {"ID"}, "Date", "Name"),

#"Group [Table]" = Table.Group(#"Unpivot [Table]", {"ID", "Name"}, {{"From", each List.Min([Date]), type date}, {"On", each List.Max([Date]), type date}}, GroupKind.Local)

in
#"Group [Table]"

Here is what I'm expecting to get as a result, each name grouped locally with a start and end date.

+----+----------+----------+----------+
| ID |   Name   |   From   |    To    |
+----+----------+----------+----------+
| 00 | Darell   | 12/29/14 | 01/11/15 |
| 00 | Kamala   | 01/12/15 | ....     |
| 01 | Jarrod   | 12/29/14 | 01/04/15 |
| 01 | Annelle  | 01/05/15 | 01/11/15 |
| 01 | Todd     | 01/12/15 | ....     |
| 04 | Lakeesha | 12/29/14 | 01/04/15 |
| 04 | Linn     | 01/05/15 | ....     |
| .. | ........ | ....     | ....     |
+----+----------+----------+----------+

with this I will generate each date in between "From" and "To" with

Table.AddColumn(#"Calculate [To]", "Date", each { Number.From([From])..Number.From([To]) })

Web Automation: Selecting Input From A Dropdown List

$
0
0

UPDATED HTML: I have posted the HTML fully expanded. I can sign onto the website just fine. Then, the first field I come to is a dropdown list. It has 173 elements to choose from. The element I need to select is "1000000173". I have tried the suggestions I have had no success populating the dropdown list.

This is the UPDATED HTML.

<div class="form-group">
        <label class="col-sm-5 control-label" for="">NPI/Provider <span class="requiredField">*</span> :</label>
        <div class="col-sm-7">
            <select name="NPI List" id="MultiselectDDL" style="width: 198px; height: 34px; display: none;" multiple="multiple">
    <option value="1000000001">1000000001  - Some Name1</option>
    <option value="1000000002">1000000002- Some Name2</option>  
    ‘ .................................. 170 more ..............
    ‘
    <option value="1000000173">1000000173  - Some Name173</option>
    <option value="1000000174">1000000174  - Some Name174</option>
</select>
<div title="" class="chosen-container chosen-container-multi chosen-with-drop chosen-container-active" id="MultiselectDDL_chosen" style="width: 198px;">
   <ul class="chosen-choices">

    ****** The bolded lines is what is highlighted when I chose “Inspect Element” on the dropdown list field. *******      
      <li class="search-field">
        <input class="chosen-search-input default valid" aria-invalid="false" style="width: 178px;" type="text" value="Enter at least 3 Characters"     autocomplete="off">
      </li>
     ****** End of the highlighted HTML *******

</ul>
<div class="chosen-drop">
  <ul class="chosen-results">
      <li class="active-result" data-option-array-index="0">1000000001  - Some Name1</li> 
      <li class="active-result" data-option-array-index="1">1000000002- Some Name2</li>
      <li class="active-result" data-option-array-index="2">1000000003  - Some Name3</li>
      <li class="active-result" data-option-array-index="3">1000000004  - Some Name4</li> 
      <li class="active-result" data-option-array-index="4">1000000005  - Some Name5</li>
   </ul>
</div>

My VBA Code:

        Sub SignOn_Cerner()
            Dim oHTML_Element As IHTMLElement
            Dim oBrowser As InternetExplorer
            Dim IE As Object
            Dim Element As String

            Dim i As Long

            Set IE = CreateObject("InternetExplorer.Application")

            IE.Visible = True

            IE.navigate "https://www.azblue.com/individualsandfamilies/"' Your webpage goes here
            While IE.Busy = True Or IE.readyState <> 4: DoEvents: Wend


            IE.document.getElementById("lockedcontent_0_maincolumn_1_twocolumn2fb4d204091d44aa08196ef423877fd9f_0_ToolbarUsernameControl").Value = "UserName"
            Application.Wait (Now + TimeValue("0:00:01"))

            IE.document.getElementById("lockedcontent_0_maincolumn_1_twocolumn2fb4d204091d44aa08196ef423877fd9f_0_ToolbarPasswordControl").Value = "Password"
            Application.Wait (Now + TimeValue("0:00:01"))

            IE.document.getElementById("lockedcontent_0_maincolumn_1_twocolumn2fb4d204091d44aa08196ef423877fd9f_0_ToolbarLoginButtonControl").Click
            While IE.Busy = True Or IE.readyState <> 4: DoEvents: Wend

    '**********This is my most recent effort ***********
            Set Providor = IE.document.getElementById("MultiselectDDL_chosen")
            For i = 1 To Providor.Options.Length
                If Providor.Options(i).Text = "1000000173" Then
                    Providor.selectedIndex = i
                    Exit For
                End If
            Next i
    '****************************************************

            Application.Wait (Now + TimeValue("0:00:01"))
            SendKeys "{TAB}"
            Application.Wait (Now + TimeValue("0:00:01"))
            SendKeys "{ENTER}"
            Application.Wait (Now + TimeValue("0:00:01"))                
        End Sub

How to copy/duplicate an UserForm

$
0
0

The problem is I've already created an UserForm and now I need another one with the same design and code.

I tried to perfom the usual copy/paste with the UserForm selected but It doesn't work. In fact, the option copy/paste appears disabled in the edition group in VBA Editor.

enter image description here

I've already tried to export the UserForm and change the name at the time to save it and import it again in my proyect but It retuns me a name matching error.

As I show in the following image I exported the UserForm with another name from the original UserForm which name is UserForm1, instead I saved this one as UserForm2.

enter image description here

This action returns me an error about the name 'UserForm1' is already used.

enter image description here

I need to duplicate this UserForm in my proyect changing the name

Using VBA to set alias From account when sending emails from Excel in Outlook

$
0
0

hope you can help me out.

I have a VBA script in Excel that, among many other things, sends an email via Outlook 365. Now, my primary email account (@outlook.com) has five aliases. These are not separate email accounts but merely aliases associated with that primary account (which itself is one out of a half a dozen primary accounts). See attached picture for maybe a better explanation I'd like to set one of those aliases as the From address but it's just not happening.

This is the relevant snippet; everything else in the Sub, including creating the email and setting the attributes and attachments, works great.

Dim emailAlias As String
emailAlias = "f...@outlook.com"

Set Mail_Object = CreateObject("Outlook.Application")
Set Mail_Single = Mail_Object.CreateItem(0)

With Mail_Single
     .Subject = Subject
     .To = Cells(cellRow, 2).Value
     .SentOnBehalfOfName = emailAlias     'doesn't work
     .SendUsingAccount = emailAlias       'no go either
     .HTMLBody = msg
     .Attachments.Add fileName
     .Display
End With

What am I doing wrong?

BTW, setting the alias as the default account can only be done online at live.com so that's not an option as it would be too cumbersome to have to (re)set it several times a day, plus it takes Outlook 365 forever to recognize the switch.

So, is thee a way to specify an alias of a primary account as the From email address?

FIll Down formula using VBA

$
0
0

trying to write a code that detects last available data in row from cell b2, and then write a formula that sums the row, puts the answer in the next blank cell after B2 E.G cell C2 and fills down to last available data

it is easy too add a formula and fill down, but this method seems unproductive since the last data in the row might change. e.g. last cell might be M2


How to write robust code that will work on slower machines for resizing large numbers of shapes in Excel VBA

$
0
0

I am working on an Excel application that creates reports from a inventory of data. This application is intended to be distributed to a large number of staff with potentially older/slower computers. As part of generating reports, a large number of shapes (80ish) are to be resized and re-positioned. I am running into problems with only some computers where the shapes are not doing what the code is dictating.

I am able to step through the code with consistent successful results regardless of the host computer. I've tried adding DoEvents and Workbook.RefreshAll statements with varying degrees of success. I also am unlinking any linked pictures.

The x1, x2, y1, y2 are points (from xWhereAmI and yWhereAmI) obtained from selecting the mid point of a cell location saved in a table dictating reference for the shape position. I can confirm that these are correct points regardless of screen resolution.

'Resize and formatting

   '(x1,y1)-----------------(x2)
   '   |
   '   |
   '   |
   '   |
   '   |
   '   |
   '  (y2)

i = 0
Set myRange = Codebackground.Range("pSOIRobjects")
For Each Pic In PSOIR.Shapes
     If Pic.Type = msoPicture Then
     'for rotated shapes
     If Pic.Rotation = 270 Then
            'x1
                myX1 = GlobalOp.yWhereAmI(Application.WorksheetFunction.VLookup(Pic.name, myRange, 3))
            'x2
                myX2 = GlobalOp.yWhereAmI(Application.WorksheetFunction.VLookup(Pic.name, myRange, 4))
            'y1
                myY1 = GlobalOp.xWhereAmI(Application.WorksheetFunction.VLookup(Pic.name, myRange, 3))
            'y2
                myY2 = GlobalOp.xWhereAmI(Application.WorksheetFunction.VLookup(Pic.name, myRange, 5))

            'resize and position
                Pic.LockAspectRatio = msoFalse
                Pic.Width = myX1 - myX2
                Pic.Height = myY2 - myY1
                Pic.Left = 0
                Pic.IncrementLeft myY1 - (Pic.Width - Pic.Height) / 2
                Pic.Top = myX2 + (Pic.Width - Pic.Height) / 2

        'for unrotated shapes
            Else
            'x1
                myX1 = GlobalOp.xWhereAmI(Application.WorksheetFunction.VLookup(Pic.name, myRange, 3))
            'x2
                myX2 = GlobalOp.xWhereAmI(Application.WorksheetFunction.VLookup(Pic.name, myRange, 4))
            'y1
                myY1 = GlobalOp.yWhereAmI(Application.WorksheetFunction.VLookup(Pic.name, myRange, 3))
            'y2
                myY2 = GlobalOp.yWhereAmI(Application.WorksheetFunction.VLookup(Pic.name, myRange, 5))

                Pic.LockAspectRatio = msoFalse
                Pic.Width = myX2 - myX1
                Pic.Height = myY2 - myY1
                Pic.Left = myX1
                Pic.Top = myY1
            End If
        End If
        i = i + 1
        Application.StatusBar = "Formatting shape "& i
        DoEvents
    Next

I expect the output to be shapes that are re-positioned and resized according to the x1, x2, y1, y2 values. However, the shapes seem to sometimes be in a lower position depending on what computer is used. On some computers the code runs flawlessly, however, on other computers the shapes are positioned incorrectly. Any thoughts or ideas are much appreciated!

Trying to create a userform in VBA that returns a set of values specified based on criteria from data in an existing spreadsheet

$
0
0

I have this set of hypothetical data in a worksheet in Excel.

PhoneStoragePriceColor

iPhone 32 GB 100 Black

Galaxy 64 GB 100 Black

Pixel 64 GB 200 Black

I would like to create a userform that will be displayed after clicking a button (I know how to do this). The userform will have list boxes, spin boxes, check boxes, frames, etc. for each of the 4 criteria. The user will then enter their desired criteria and the macro will output the available options or return an error if the specified criteria does not exist. Also, if a user does not want ot include a specific criteria (say color) then this should be considered.

Expected output:

If the user says Phone name and storage are irrelevant and checks 100 for price and black for color. The output should produce all the information for the iPhone and Galaxy.

Anything helps.

.atomsvc file downloaded from an internet reporting site does not open in excel

$
0
0

No matter what I try, it doesn't seem to work. I have tried to import in both the powerpivot tab and the data tab. The closest I have gotten is an error stating: "The content of the data feed is not valid for an Atom feed." Here is the code inside of the atom file:

<?xml version="1.0" encoding="UTF-8" standalone="true"?>

-<service xmlns="http://www.w3.org/2007/app" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom">


-<workspace>

<atom:title>OperationallyAvailableCapacityV03</atom:title>


-<collection href="http://navrptssrsprod.inet.tcpl.ca/ReportServer?%2FInfoPost%2FOperationallyAvailableCapacityV03&pGasDate=10%2F18%2F2018%2000%3A00%3A00&pAssetNbr=51&pLoc%3Aisnull=True&pCycleId=0&pLocProp%3Aisnull=True&pDirOfLow%3Aisnull=True&pLocName%3Aisnull=True&rs%3AParameterLanguage=&rs%3ACommand=Render&rs%3AFormat=ATOM&rc%3AItemPath=table1">

<atom:title>table1</atom:title>

</collection>

</workspace>

</service>

Any help would be much appreciated. Thank you!

Possible to limit number of rows/columns in a nested aggregation?

$
0
0

I have a pivot table in Excel: https://i.stack.imgur.com/k1974.png (StackOverflow won't allow me to actually embed a picture).

This pivot table comes out to about 10,000 rows. While it is possible to limit any number of the aggregations (for example, "top 10 of 'Column1'"), I was wondering if there was a way to limit the "total" number of either rows or columns in an Excel document, even if it results in truncation of results.

Here is an example of Excel "cutting off" the results when it reaches the Excel max, but can I set this limit myself?

https://gyazo.com/fee7ce4f863ddbe5060f178b57792230

Replace folder if same name

$
0
0

I want to create a folder where I will save the files. If a folder with a specific name already exists I want to replace this folder with a new, empty one. Dont know what to do with this Else thing. Im getting run time error 75 path/file access error.

Path = "\\ASD\"
d = Format(Date, "yyyymmdd")
f = "NBT Reports "
If Len(Dir(Path & d, vbDirectory)) = 0 Then
MkDir (Path & f & d)
ElseIf ???
End If
Viewing all 88854 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>