IF Function - Design Generator In Excel That Generates Algebraic Expressions
Feb 27, 2013
I am trying to design a generator in excel that generates algebraic expressions.
For example
In cell B4 the formula is RANDBETWEEN(1,12)
In cells C4:29 I have letters a - z listed in a column one letter per cell.
In a separate cell from which excel reads is the formula:
=B4&CHOOSE((RANDBETWEEN(1,26)),$C$4,$C$5,$C$7,$C$6,$C$8,$C$9,$C$10,$C$11,$C$12,$C$13,$C$14,
$C$15,$C$16,$C$17,$C$18,$C$19,$C$20,$C$21,$C$22,$C$23,$C$24,$C$25,$C$26,$C$27,$C$28,$C$29)
For example one possible result would be 3f.
However if the result was 1m, in a separate cell I want excel to realise that B4=1 and then display it as m.
I've attached the spreadsheet as well : algebra.xlsx‎
View 1 Replies
ADVERTISEMENT
Jun 21, 2009
When I open a spreadsheet I get the following message
Excel found unreadable content in Book_Name. Do you want to recover the contents of this workbook.
All the information I find says:
This issue occurs if the following conditions are true:
The workbook contains a PivotTable that uses key performance indicators (KPIs).
The KPIs are created in the Analysis Services Business Intelligence Development Studio.
One or more of the KPIs have an expression in the Current Time Member property.
and the fix is : To resolve this issue, remove the expressions from all Current Time Member properties.
My issue is - the spreadsheet with Pivot tables is supplied to me. I am using Excel 2007 - how to remove the expressions?
When I do this on another machine same version of excel I have no issue.
View 3 Replies
View Related
May 26, 2010
I use a Macro that when run, will generate an email with the excel sheet attached. See attached example.
My two questions are:
- Is it possible for the body of the email that is generated to have spaces within the text? So it shows more like the below:
"Good morning,
Please find today's forecast for Friday, May 07, 2010 attached.
FRC Treasury Team"
- Also, the colors in the spreadsheet change automatically when the macro attaches the sheet. Why is this? Is it possible to do something so that this does not happen?
View 5 Replies
View Related
Apr 10, 2014
I have a VBA macro for automatically create a word report using data in Access and Excel. The macro is hosted within a Excel document but are using both Word-, Excel and Access objects/dataTtemplates for the creation.
The errors appears what it seems randomly. The macro iterates the same code a few times even in Office 365 but then it crashes. The most common error messages are:
Error 1:
Run-time error '-2147417851 (80010105)':
Automation error : The server threw an exception.
Error 2:
Run-time error '462':
The remote server machine does not exist or is unavailable
Error 3:
This action cannot be completed because the application () is busy. Choose Switch To to activate and correct the problem.
(no options are working, this hang the application)
If I debug usually the error originates from the code where I ether close the workbook template I'm using:
excelWorkbook.Close False
... or when I paste a chart from Excel to the Word report:
wordDocument.ActiveWindow.Selection.PasteSpecial
Even more strange are that sometimes if I continue to run the macro its all working again. This ONLY happens when the client office installation is O365. Office 2013 works just fine. I thought O365 and Office 2013 was fairly equal?
View 1 Replies
View Related
Jul 27, 2009
I'm trying to determine if a rangeName is defined so that I can delete it without a programming error. I've used the idea that if I try to goto a non-existant rangeName, I'll get an error. I've tried to design a function that will return true or false if the rangeName is defined on the basis of that idea. Can you take a look at the code and see where I went wrong?
View 4 Replies
View Related
Jan 20, 2013
I'd like to make a conditional design for a row. If a certain cell equals "x" I'd like to color the whole row with grey My version of excell is 2003
View 7 Replies
View Related
Jun 15, 2014
A typical Design Matrix is shown in the attached Workbook. There are two domains of Merged Cells that make up the Headings of the Matrix; FRs (Functional Requirements) and DPs (Design Parameters). Given a Hierarchical List of FRs specified by the User, the User would like Excel to bulild the Matrix Hierarchy of FRs automatically (going down the Worksheet). The DP Hierarchy is the same hierarchy, except transposed and reflected across the Worksheet. The attached Workbook has up to seven (7) levels, but the ability to go create up to 10 levels is desired.
View 8 Replies
View Related
Mar 17, 2014
I am a happy user of Office 2007 and a casual coder. I am familiar with most of the basics of coding and enabling macos. However today, when I attempted to add some code to a workbook, I noticed that Excel would not actually enter design mode. Even though the design mode button will toggle and stay in the "on" mode, I cannot access VB property panel for any controls, even standard contols. Also, I am forced to CTRL-CLICK objects to select them and then am only presented with standard "Format Control" option, not object properties.
One other odd sympton... I can use the macro recorder to add code to a control (a checkbox for example), but when I try to manually add a line of code referencing that object (using the default name), the VB editor does not recognize the object. For example the IDE would not recognize and code a line for the "checked" property of a checkbox control when I check the box while in macro record mode.
These symptoms suggest to me that there is something wrong with the design mode "switch".
This all used to work fine, but it's been a while and many MS updates to my Windows 7/64 machine (now about 4 years old).
View 1 Replies
View Related
Jan 29, 2009
I have a dataset storing 6 numbers in a row (where each number range from 1 to 50 and no duplication of number within each row). Totaling there is 1000 rows ....
View 9 Replies
View Related
Dec 8, 2011
Excel 2010 O/S XP Macro for serial number input all serial numbers have JTC0. Any VBA code to place in macro to have a cursor appear after the four characters in the macro below?
Example: JTC0| < cursor ready for input
Sub Macro2()
'
' Macro2 Macro
'
' Keyboard Shortcut: Ctrl+s
'
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "JTC0"
End Sub
View 4 Replies
View Related
Apr 8, 2014
Problem: Have a squad of 8 players in my darts side. We have 12 games in our season and each game requires 4 players so each player will play 6 games. 6 of these games are at home and 6 are away.
I want to create an excel sheet whereby a team will be picked for each match. Each player will play at Home and Away 3 times each. And the same group of players will not play with the other players each time.
eg. Week 1- Team Players, 1, 2, 3, 4
Week 2 - Team Players 5,6,7,8
Week 3 - 1,3,5,7
Week 4 - 2, 4, 6, 8 etc.
Where to start. There are multiple variables.
View 2 Replies
View Related
Dec 11, 2009
Documents......Data.xls
where "..." is any old string of characters?
View 9 Replies
View Related
Jul 7, 2014
I'm trying to do a COUNTIF using regular expressions. I can do it in SQL, but I'm having a hard time figuring it out in Excel.
My SQL query looks like:
[Code] ....
In Excel, I'd like to do the same thing so that I can send it to a client and have the counts already in the spreadsheet. Basically, I want count anything that has 5 numerical digits followed by "_.....".
View 3 Replies
View Related
Sep 24, 2009
Hope the title isn't too broad. Every time I think I have got to grips with RegExp I get stuck on something apparently quite simple. So, I have a few queries so I hope OK to bundle them together.
1. How do I remove the word 'of' only if it occurs after certain other words (the other words should also go). E.g.
"Vale of White Horse" should stay the same
"Borough of Lambeth" should become "Lambeth" (because 'of' after 'Borough')
I tried "Borough(sof*)" but that doesn't remove either word.
2. How do I remove everything after a '/' (inclusive)?
I have tried "/sw+" which removes the first word after '/' but there could be other words
3. How do I remove everything inside brackets (inclusive)?
View 6 Replies
View Related
Sep 27, 2006
I need to extract DIGITS from following: C23, C24, C515-C519. It may be done with regular expressions. Does anybody have experience with VBA code for RegEx?
Input: C23, C24, C515, C519.
Output: 23,24, 515, 519
View 5 Replies
View Related
Jan 2, 2014
i'm using excel 2003 and i'm trying to mark 7 cells in a row by conditional design by one of the cell
example : if the date on january? mark all line in yellow, for february mark in red and ect
A B C
528602545 assafsarit@walla.com 01/01/2013
527271005 eti_sh6@walla.com 01/01/2013
[Code] ...........
View 4 Replies
View Related
Nov 18, 2009
I have been getting this '5' error a lot lately and I dont know why. Many of my macros have had this error. Run-time error '5': Invalid procedure call or argument. The offending (Highlited in Red)
View 3 Replies
View Related
Dec 29, 2008
I have a cell that is data validated via a list. Currently it contains the entire list of options (Office Names) that I want to be included. However, I am trying to use passwords that I will assign to users (Office Managers) that will allow them to only select their offices from the list. I struggle with VBA so any help would be appreciated!
View 9 Replies
View Related
Dec 18, 2008
I use a macro that automatically generates a pivot table, re-formats the data, and then makes sure there are no blanks and that the DATA area of the pivot table is set to SUM OF and not COUNT OF.
It was working just fine yesterday but today it is giving me the following error and is highlighting this section of my
View 6 Replies
View Related
Oct 10, 2007
In Excel I've declared an array outside of any sub or function.
Dim programList() As String
Now I want to use that array, populating and depopulating as needed by calling these subs from elsewhere:
Sub addProgramToArray(ByVal x As String)
' Adds worksheet names to an array for use with adjusting program lengths
If IsArray(programList) Then
thisCount = UBound(programList)
End If
Redim Preserve programList(thisCount + 1)
programList(thisCount) = x
End Sub
Sub removeProgramFromArray(ByVal x As String)
' Removes worksheet names from array, for use with adjusting program lengths
' We do this without resorting the array
If IsArray(programList) Then
For i = 0 To UBound(programList) - 1
If programList(i) = x Then
programList(i) = ""
End If
Next
End If
End Sub
But when run it generates an Error 9 Subscript Out of Range error on the addProgram or removeProgram subs. I suspect it might be the ubound on an empty array, or the fact that I'm trying to use an array I declared outside of the subs.
View 9 Replies
View Related
Feb 6, 2014
Scenario: I have 5 different tables, all having the same headers. The values under are Vlookups.
Objective: Create a dropbox that lists (Table 1, Table 2, etc.) For whichever table is picked, is the one that will show.
For example, if I want table 1 to populate, I would chose table one in the drop box and so on for the rest of the other tables.
View 6 Replies
View Related
Jan 14, 2010
Reference: [url]
I delete sheet1, copy sheet3, rename to sheet1 and then attempt to rename the CodeName to Sheet1 as well.
This worked initially with out errors.
Now on the first run of the macro it generates an error:
Run-time error '32813':
Method 'name' of object '_VBComponent' failed
This fails to rename the CodeName of "Sheet1" (.Name)
Run it again and it renames the CodeName but generates yet another error:
Run-time error '-2147221080 (800401a8)':
automation error
View 10 Replies
View Related
Aug 1, 2008
I have the following issue and hope someone can help:
I'm setting a conditional formatting formula in a range of about 2000 cells using VBA.
The procedure works fine on my PC, but generates "runtime error 5" on all of my colleagues PC's. (We all use the same version of Excel 2003).
The procedure I am using is: ...
View 9 Replies
View Related
Nov 17, 2012
Why this error is coming up on a macro. Now to what I'm trying to accomplish is I have 1 sheet called GDL and I want to pull certain data from that sheet into another sheet called data sheet. I have formulas set in the data sheet to pull the information I want. However, I want to create a macro to pull the data for those formula or I guess another way of looking at it would be a auto fill function, except with a macro button. Please see the following error I receive when trying to run the macro.
Run-time error '1004': Autofill method of range class failed. The following is the macro.
VB:
Sub ResetDataSheet()
'
' ResetDataSheet Macro
' Macro recorded 11/13/2012 by asdf
'
[Code] ....
View 5 Replies
View Related
Mar 26, 2009
I have created a design in excel and now need to shrink it to fit on 1 page. Is there any way to do this?
View 2 Replies
View Related
Jul 28, 2006
I've been reading some threads lately about worksheet design and wanted you advice on something.
I have a worksheet that is about 7.5mb. The details of the worksheet are:
A. 19 total worksheets within workbook, three are visible
B. 1 master worksheet (raw data) that is updated monthly
C. There are 13 worksheets (for each outer office) that pull data from the master.
D. A couple of "Summary" sheets that summarize totals, profits, losses for each area
Situation is this....All code runs fine, but when it's time to save the worksheet it is kind of slow doing so b/c of size.
Would you suggest making a seperate WORKBOOK for the outer offices? I gave this a try yesterday and it worked fine, but I also added code to save once the data was extracted and that part took about 5-6 seconds (I know that's not horrible, but I'm comparing it to previous times).
View 3 Replies
View Related
Dec 17, 2009
I am going to attempt to design a production spreadsheet which does the following:
1.Orders are put on one page of the spreadsheet (Order Tab) The order is put on listing, Customer, Sizes, Qty etc
2.The user is then able to select an order and if possible I would like a pop up calendar to appear in which the user can then select a production date.
3.One the production date has been selected I want it to open up a new tab if one doesn’t already exist and then cut the information from the order tab and then paste it into the production day.
I have provided a spreadsheet of what I want to achieve but I am unsure if this is possible.
View 14 Replies
View Related
Apr 29, 2008
For some strange reason the workbook I have been using on a daily basis has suddenly decided to go into design mode and stay there. No matter how many times I click the design mode button in and out it always stays in and I can't use my buttons.....it just selects them?
View 9 Replies
View Related
Aug 4, 2006
how to customize the userform with the background like Ivan's userform:
View 3 Replies
View Related
Aug 10, 2007
I have been tasked with performing a work measurement study to improve productivity in our organisation. I managed to adapt a paper based report to an excel file; with the view of creating a model. I also intend adding the cost of employing people in specific positions to determine the cost per hour for each specific activity.
View 2 Replies
View Related