Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

(80% Discount Ends Soon!)

Close Window (X)   
Excel VBA Course
[80% Discount] Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

(80% Discount Ends Today!)

Multiple Combination Generator

Hello People,

I have a workbook with loads of worksheets in. There are lists of keywords in cols. A-I. I need to combine these words to make all possible strings of words in certain combinations.

EG: in col: J the title is: C-A-E, And in this column I need all the combinations of words in columns C, A and E.

Theit are other columns with different combinations. can I get excel to look at the column name and then make the selections of col.s to combine?? I would like to make a macro to do it really.

The problem is all the worksheets are different, Any help appreciated. I am currently using DigDB, and it is ok, but still takes too long fr me!!


Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons 50+ Hours of Instruction 200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

(80% Discount Ends Soon!)

View Course




Similar Topics







HELP!!

I need to know the formula (if there is one) for Excel to figure all the possible combinations of a given set of numbers that will add up to a specified sum.

In other words, if I give the following numbers 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7 - I want Excel to figure all the possible combinations that will add up to 23, and also SHOW ME those combinations, and not just HOW MANY combinations there are.

i.e. one possible combination is 2, 2, 3, 4, 5, 7

Can this be done? What is the formula? I'm having a hard time figuring it out!!

Desperately,
Jenny


I want to generate all possible combinations of 11 combination 4. I know there are 330 possible combinations but how can i let excel generate all the combinations. 1-11 combination 4.

For example. 1 2 3 4 5 6 7 8 9 10 11 taking 4 at a time:
1234
1235


Hi Forum,

Need help to generate Series of Items in different Permuation & Combinations..

For Ex:- If there are three Items.. A B C and forming a group of 2
then the the total no of combinations would be permut(3,1) = 6...

I need this to be shown as follows depending on the no of itmes and no of group no=2 in this case...

Permuations & Combinations are as follows:

AB
AC
BC
CA
CB
BA


I have a long list of item descriptions that I need to filter down to descriptions containing words like "valve" or "ring" or "root" or "epic" (17 key words in all). The basic custom filter looks like it only lets me filter for 2 words.

I have some experience working with advanced filter for things like >100 but that's about it. Any help with this would be so appreciated.


Hello gurus!

Here's my question...I have a list of numbers and I want to know how many combinations (and what they are) of adding the numbers will equal an amount.
e.g.
List of Numbers
1
2
3
4
5
6
7
8
9
10

Amount to be reached = 12

These are some of the possible combinations to reach 12 :
2+10
3+9
4+8
5+7
3+4+5
6+3+2+1

Is there a function in Excel that will do this for me? I want to know which numbers (i.e. cells) can be added to reach 12. AND, if possible, colorcode the cells added for each combination.

Good luck and thanks!!


Hi peeps

I want to combine data from several worksheets into one worksheet.

For example, I have data in Sheet1 (Columns A,B,C), data in Sheet2 (Columns A,B,C), data in Sheet3 (Columns A,B,C) all with varying amounts of rows. (All the rows contain text data).

I need to combine all of the data from the 3 sheets into a single sheet, Sheet4 (Columns A,B,C), eliminating the empty rows.

I've been looking into this for a while, and can't find anything that really helps. Anyone got any pointers of what to look into?

Any help will be beautiful.

Cheers



This formula should be very often to use, but i cant found it anywhere, so i ask this here




For example in a1 is :
mike is playing basketball, he is very great player

i want to make it in b1 to be uppercase only in first letter so :
Mike is playing basketball, he is very great player






i know about proper formula =proper(a1) , but proper formula is make uppercase to all first letter in all words, we just need first letter in first words to be uppercase (and to every first words after dot if it can)


I am using below code, but it only untill 19,999. Amount from 20,000 and above only show thousand? Please help!

For 19,999 it show
Ringgit Malaysia : Nineteen Thousand Nine Hundred NinetyNine Only

For 20,000 and above it show
Ringgit Malaysia : Thousand Only

Code as below:

Function SpellNumber(amt As Variant) As Variant
Dim FIGURE As Variant
Dim LENFIG As Integer
Dim i As Integer
Dim WORDs(19) As String
Dim tens(9) As String
WORDs(1) = "One"
WORDs(2) = "Two"
WORDs(3) = "Three"
WORDs(4) = "Four"
WORDs(5) = "Five"
WORDs(6) = "Six"
WORDs(7) = "Seven"
WORDs(8) = "Eight"
WORDs(9) = "Nine"
WORDs(10) = "Ten"
WORDs(11) = "Eleven"
WORDs(12) = "Twelve"
WORDs(13) = "Thirteen"
WORDs(14) = "Fourteen"
WORDs(15) = "Fifteen"
WORDs(16) = "Sixteen"
WORDs(17) = "Seventeen"
WORDs(18) = "Eighteen"
WORDs(19) = "Nineteen"

tens(2) = "Twenty"
tens(3) = "Thirty"
tens(4) = "Fourty"
tens(5) = "Fifty"
tens(6) = "Sixty"
tens(7) = "Seventy"
tens(8) = "Eighty"
tens(9) = "Ninety"

FIGURE = amt
FIGURE = Format(FIGURE, "FIXED")
FIGLEN = Len(FIGURE)

If FIGLEN < 12 Then
FIGURE = Space(12 - FIGLEN) & FIGURE
End If

If Val(Left(FIGURE, 9)) > 1 Then
SpellNumber = "Ringgit Malaysia : "
ElseIf Val(Left(FIGURE, 9)) = 1 Then
SpellNumber = "Ringgit Malaysia "
End If

For i = 1 To 3
If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
Ntow = Ntow & tens(Val(Left(FIGURE, 1)))
SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If

If i = 1 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & " Crore "
ElseIf i = 2 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & " Hundred "
ElseIf i = 3 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & " Thousand "
End If
FIGURE = Mid(FIGURE, 3)
Next i

If Val(Left(FIGURE, 1)) > 0 Then
SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 1))) + " Hundred "
End If

FIGURE = Mid(FIGURE, 2)

If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1)))
SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If


FIGURE = Mid(FIGURE, 4)


If Val(FIGURE) > 0 Then
SpellNumber = SpellNumber & " And Cents "
If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
ElseIf Val(Left(FIGURE, 2)) > 19 Then
SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1)))
SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
End If
End If
FIGURE = amt
FIGURE = Format(FIGURE, "FIXED")
If Val(FIGURE) > 0 Then
SpellNumber = SpellNumber & " Only "
End If
End Function


Is there a worksheet function that will generate all possible combinations of
a set of given numjbers. For example, 1, 3 and 8 would generate 138, 183,
318, 381, 813, 831 and so on...



We have a workbook that does not allow us to use the Move or Copy command. When we right click on the worksheet and select Move or Copy, we are able to check the box to make a copy, but when we click OK nothing happens.

We have checked to make sure that the workbook and worksheet:
1. Are not protected
2. That there are no hidden worksheets
3. That there are not worksheets that exist with the same name
4. That not all the worksheets are selected

There are only two worksheets in this workbook.

Any ideas of why we are unable to make a copy of this worksheet within the same workbook or to another workbook?


I want to create 6 numbers from 11 numbers..
lets suppose my numbers a 1,2,3,4,5,6,7,8,9,10,11
I want to generate all possibilities of the 6 numbers. But i dont want duplicate series.. I mean 1,2,3,4,5,6 and 6,5,4,3,2,1 are duplicates.

ANY HELPS ARE GREATLY APPRECIATED


Hi All,

If I drag a formula to the right it adapts the column letter in the formula from A to column B, which is standard Excel functionality.

However, if I drag the formula to the right I want Excel to skip a column each time.

In other words:

=A1 ; = B1 ; = C1

Should be

=A1 ; = C1 ; = E1 etc...

Is there an easy trick to do this?

Thanks,

Michiel


Is it possible to import a single text file into Excel, splitting the incoming data across multiple worksheets rather than a single worksheet? Each each row on the text file would be evaluated by the value in one of it's "columns" and written to the appropriate worksheet. The file is "!" delimited and has 11 columns for each row.

Currently, I import the file into one worksheet and cut/paste the rows manually into new worksheets/tabs. The files are very large, sometimes exceeding the 65,536 row limit, which I could avoid if the data was split out coming in.

Any help anyone could provide would be WONDERFUL. Thanks!


Hi, I'm trying to get some macros to combine data from two open workbooks, and I can't figure out the commands to switch from the active workbook to the other open workbook and back. I'm new to VBA and just learning the ropes. All I can figure out is how to switch to another workbook with an exact name. If I record the macro to go to a recent file, for example Window > 1 (filename), the code that I get in VBA is Windows("filename").Activate. This doesn't translate to when I have two different workbooks with different filenames open.

Make sense? I'm a bit confused myself. Maybe just a list of basic workbook-switching techniques or commands would be useful.

- Michael


I want to make a searchable drop down menu. In other words if I click on it and press "D" I want to see the instances that begins with a D.

How do I do this?


Hi! I am new to Excel and I am creating fillable forms in excel which are protected so that users canonly input data in certain cells. I am using Excel 2003. The users told me that they do not want text to go beyond the edge of the page when they are inputting data. They also want the words to wrap when they reach the end of the sentence. I am also using check boxes(yes/no) and Ifind it difficult to make the adjacent cells fillable only Thanks for your help and correct me if I am wrong as I am new to this board.


I'm sure this has been addressed before, and I'm sure one of you 50lb heads has the answer I'm looking for. I want to generate a bank of 200-300 questions in excel and be able to make a test of 50 questions that will be different every time. I want to be able to do this with multiple choice questions as well as just plain essay questions. Can I have some instruction or examples? Thanks guys!


I have never really used VBA and so am completely stuck at this problem. I need to create a macro which auto-populates a master worksheet from the individual user sheets in a shared workbook.

Sheet 1 is the master sheet "Team Stats". There will be an undetermined number of individual worksheets to accomodate new staff.

Each worksheet will be identical, using columns A-I with row 1 having the headings:

Date, Name, Reference, Value, Price, Age, Purchased?, Destination, Add. Products (the last 3 columns will have a drop-down list which will be used to enter data into the cell).

There will be a varying number of rows in each of the individual sheets.

If possible I would like the macro to run every time data is entered into one of the individual worksheets. If this is not then it would be fien to update every time the workbook is opened.

If anyone can help it would really cut down the time I spend collating these stats every day!


Sorry for the question. Normally I find answers to my excel questions by going through the help tab or by searching on Google. However, I don't even know what question to ask on this one!?!

Basically I have created a spreadsheet with several columns, but I have one column that lists the shirt size (YS, YM, YL, AS, AM, AL, XL, 2X, 3X) of each person. Is there a formula that I can create that will tabulate the number of sizes (i.e. AS=2, AM=7, etc.)?

In previous years I made a column for each size, and simply placed a "1" in the correct column, and had excel just add the 1's from each column. However, that takes more time and space. I was hoping to streamline it this time around.

Thanks for taking the time to read this post. Any help would be appreciated! Thanks, doug


Hi,
I am looking for a method/formula that will reverse multiple text entries from "abcde" to "edcba". The entries are composed of several words that need to be reversed ie from "ab cde fg" to "gf edc ba"

Thanks