Posts

Showing posts with the label Microsoft Excel

Can't Import JSON In Excel 2016 Using "Get & Transform" Feature

Answer : I ran into the same situation, and then found a work around on the following page: https://techcommunity.microsoft.com/t5/Get-and-Transform-Data/Missing-JSON-option-at-Data-gt-New-query-gt-From-File/td-p/69747 In short, the steps are to: New Query -> From Other Sources -> From Web; Type in (or Copy-Paste) an url to you Json data and hit OK button; After Query Edit opens, right-click a document icon on a query dashboard and select JSON and your data is transformed to a table data format. Thanks to 'Good Boy' who provided the work around in the article mentioned. If the json file is on your computer, a file, you can enter ' file:\c:\filename.json ' in place of the web url. Don't include the '. The easiest way is to use the file browser and copy the path to the file and then add the file name at the end.

Can I Produce A Row In Excel Which Is Random Permutation Of Another Row?

Image
Answer : Place the values in A1 through G1 In A2 through G2 enter: =RAND() In A3 through G3 enter: =INDEX($A$1:$G$1,MATCH(LARGE($A$2:$G$2,COLUMN()),$A$2:$G$2,0)) Each time the worksheet is re-calculated, a new permutation will be generated. I use a method similar to what Gary's Student posted, but I use RANK in my formula instead. I think this simplifies the formula and makes it a little easier to understand. For sample data in A1:G1 : dog mouse rhino ape cat fish rat Fill the formula =RAND() across A2:G2 . Then fill the formula below across A3:G3 . =INDEX($A$1:$G$1,RANK(A2,$A2:$G2)) This is good for a one-off or a small number of rows. For a more robust solution, I would use VBA. The macro below will allow you to select the values you want to shuffle and specify the number of permutations you'd like to create. The permutations will be printed to a new sheet, where you can copy and paste them wherever you like. Sub nP...