0% found this document useful (0 votes)
56 views

Create All Possible Combinations From Different Ranges Without Using VBA

This document provides steps to create all possible combinations from different ranges of numbers without using VBA. It involves defining named ranges for the number ranges, using Microsoft Query to select the named ranges and generate the Cartesian product, and returning the results to the Excel worksheet. Refreshing the results range will automatically update it if the source ranges are modified. The objective is accomplished without macros by leveraging named ranges and the Microsoft Query feature in Excel.

Uploaded by

Bellum Letale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Create All Possible Combinations From Different Ranges Without Using VBA

This document provides steps to create all possible combinations from different ranges of numbers without using VBA. It involves defining named ranges for the number ranges, using Microsoft Query to select the named ranges and generate the Cartesian product, and returning the results to the Excel worksheet. Refreshing the results range will automatically update it if the source ranges are modified. The objective is accomplished without macros by leveraging named ranges and the Microsoft Query feature in Excel.

Uploaded by

Bellum Letale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

9/14/2015

CreateallpossiblecombinationsfromdifferentrangeswithoutusingVBA

Createallpossiblecombinationsfromdifferent
rangeswithoutusingVBA

{ 25Comments }

PostedbyAshishMathuronJuly21,2013inDATACONSOLIDATION
Tagged:MSQUERY,NAMEDRANGES,TABLE

Assumenumbersfrom1to8inrangeB3:B10andnumbersfrom9to16inrangeC3:C10.Theobjectiveistocreateallpossible
combinationsincolumnEfromthesetworangeswithoutusingVBA(macros).Thiscombinedrangeofallpossiblecombinationsis
calledaCartesianproduct.
YoumayrefertothefollowingstepstocreateallpossiblecombinationsincolumnE
1.TypeaheadingincellB2,sayDataSet1.FormatcellB2toBold(Ctrl+B).
2.TypeaheadingincellC2,sayDataSet2.FormatcellC2toBold(Ctrl+B).
3.SelectrangeB2:B10,pressCtrl+F3>Newandinthenamebox,typeData_set1
4.SelectrangeC2:C10,pressCtrl+F3>Newandinthenamebox,typeData_set2
5.SelectrangeB2:B10andpressCtrl+T>OK
6.SelectrangeC2:C10andpressCtrl+T>OK
7.Savethefileatyourdesiredlocation,sayonyourdesktop
8.SelectcellE2andgotoData>FromOtherSources>FromMicrosoftQuery>ExcelFiles>OK
9.IntheSelectWorkbookdialogbox,navigatetothefolderandselectthefilewhichyoujustsavedonthedesktop(instep7above)
andclickonOK
10.WithData_set1selected,clickonthe>symbol
11.SelectData_set2andclickonthe>symbol
12.ClickonNext>OK
13.GotoFile>ReturnDatatoMicrosoftExcel
14.IntheImportDatabox,selectcellE2intheExistingWorksheetboxandclickonOK.Justincase,youdonotseetheImportData
box,afterstep12,pressAlt+Tab.
15.YoushouldnowseeyourdesiredresultinrangeE2:F66.
Furthermore,sinceyouhadconvertedtherangesincolumnBandcolumnCtoTablesindividually,ifyouaddadditionalrowsofdatato
columnBand/orcolumnC,justrefreshwhileyouareclickedonanycelloftheresultrange.Thiswillupdatethetableintheresult
area.

40

15

Like

http://www.ashishmathur.com/createallpossiblecombinationsfromdifferentrangeswithoutusingvba/

1/1

You might also like