Excel 2007 :: Macro To Play Different WAV Files Depending On Value Of Certain Cells
Feb 19, 2014
I have built a darts scoreboard on Excel 2007, to track scores but also record statistics such as 3 dart average and -checkout success. As I don't know how to write macro's I've created it using formulae only - it's not fancy but does the job!
I have a number of .WAV files that call out the main scores - 60, 100, 140 and 180 and I'd like the scoreboard to play the relevant file when someone scores that amount. I've trawled through lots of forums but have been able to find one that does exactly what I need it to, and I don't know how to adjust the ones I've found.
This is how the scoreboard works:
There are 25 different sheets, one for each leg of the match that could be played. The sheets are named Leg1, Leg2, Leg3 etc.On each sheet, Player 1's scores are entered in cells J15 to J47, and Player 2's scores are entered into cells O15 to O47Once Player 1 or Player 2 wins the leg, I move on to the next sheet to play the next leg. All the scores entered remain in each sheet until the match has ended
This is what I need the macro to do:
When a score of anything other than 60, 100, 140 or 180 is entered, do nothingWhen a score of 60, 100, 140 or 180 is entered, play the relevant .WAV fileIf, for example, Player 1 scores 60 the '60' .WAV file plays. 60 will be left in J15, then Player 2 may score 100, which will be entered into O15 and should trigger the '100' .WAV file.Note that either Player 1 or Player 2 can start the leg, so the order scores are entered between column J and column O can differ.
View 6 Replies
ADVERTISEMENT
Sep 3, 2012
I am using 2007. This may be something simple but I can't seem to find a solution to this, I have an excel macro enabled workbook which produces a daily report the final task is to save and send an email but I need the file to save as an xls rather than xlsx as some of the recipients are unable to open the file here is the code used for the tasks in the
workbook:Sub Step1_Refresh()
'
' Step1_Refresh Macro
'
'
ActiveWorkbook.RefreshAll
End Sub
Sub step2_save_close()
[Code] ........
View 1 Replies
View Related
Sep 3, 2012
I am using 2007, I have an excel macro enabled workbook which produces a daily report the final task is to save and send an email but I need the file to save as an xls rather than xlsx as some of the recipients are unable to open the file.
Here is the code used for the tasks in the:
workbook:Sub Step1_Refresh()
'
' Step1_Refresh Macro
'
'
[Code]....
View 7 Replies
View Related
Mar 26, 2014
How do I get my spreadsheet to play wav files I have saved according to certain criteria?
i.e. if certain value is entered into the cell, or on opening of the spreadsheet
I have message boxes appearing for the values in certain cells, however, don't know how I would add in the playing of a wav file to enhance this.
View 3 Replies
View Related
Jan 27, 2013
I use Windows Vista and Excel 2007.
So to cut to the chase :
On my spreadsheet, I have 6 main groups of columns, each one comprising 4 columns with their own automated calculations across the range.
Group 1: Cell H5, Cell I5, Cell J5, Cell K5
Group 2: Cell L5, Cell M5, Cell N5, Cell O5
Group 3: Cell P5, Cell Q5, Cell R5, Cell S5
Group 4: Cell T5, Cell U5, Cell V5, Cell W5
Group 5: Cell X5, Cell Y5, Cell Z5, Cell AA5
Group 6: Cell AB5, Cell AC5, Cell Ad5, Cell AE5
Then I have two columns following those: Col AG, Col AI
In each one of those two columns, I am trying to sum up a total value using The IF Function.
In Cell AG5 : the sum of the values of cells K5+O5+S5+W5+AA5+AE5,
ONLY IF the values of Cells H5, L5, P5, T5,X5, AB5 is equal to AG3 (which is a symbol (wingding 3 for capital P), this occurs 3 times out of 6, sometimes twice only, and at random, so I need the sum of 3 cells (or 2) out of 6, based on the above criteria.
Same in Cell AI5: sum of the values of cells K5+O5+S5+W5+AA5+AE5
ONLY IF the values of Cells H5, L5, P5, T5,X5, AB5 is equal to AI3 (which is a symbol (wingding 3 for capital L), this again occurs 3 times out of 6, sometimes twice and again at random, so again I need the sum of 3 cells (or 2) out of 6, based on the above criteria.
Using the formula: =IF(T5=AI3,(W5),0) , I retrieved the value of cell W5 into cell AI5; and when I tried the formula :
=IF(T5=AG3,(W5),0) , in cell AG5, it returned the value 0 which is correct again, as T5 was equal to AI3 but NOT to AG3.
But I cannot work out how to add all of the three values relating to each symbol, independently in each column, as they each occur randomly.
This is the way it looks in the spreadsheet:
Cell H5 Cell I5 Cell J5 Cell K5/ Cell L5 Cell M5 Cell N5 Cell O5/
Symbol (for P) Text Text Value /Symbol (for L) Text Text Value
And so on 4 more times across.
I could of course add it all manually for each line but I would rather have a formula to do it for me as all the other calculations are automated and/or conditionally formatted.
View 9 Replies
View Related
Jan 29, 2009
I use Excel 2007 which is creating a whole load of tmp files of the spreadsheet that I work on.
Is there a way tostop Excel from creating and saving the tmp files?
View 14 Replies
View Related
Jan 11, 2009
I'm using 2007 Excel and I have a list of 200 JPG files on column A which mirror actual file names of files I have located in C:photos.
My objective is to use Excel 2007 to batch rename all the files located in C:photos from the names listed in column "A" to the names listed in column "B" that I have created.
a VBA script that will accomplish this task?
View 4 Replies
View Related
Feb 15, 2013
I run two monitors and am able to open different files on each monitor which is very handy.
This doesn't seem to work with Excel. If I have two different Excel files open I can only view one at a time. I can move across to the other monitor, but then can only view one at a time on that monitor - very frustrating.
When I was using Excel 2010 on my last job I was shown a clunky, round-about way of being able to open two Excel files, one on each monitor. (By opening one file, opening a new Excel document from there, and then opening the other Excel file from the new document, minimizing that file and dragging it to the other screen).
Now I am using Excel 2007 and am not able to view two different Excel files, one on each screen. how I can do this in Excel 2007?
View 6 Replies
View Related
Mar 10, 2013
I am trying to rename a lot of files within 1 folder. The Spreadsheet Column A contains all the old file names within a folder and Column B has the new file name. (1)My code is below but I continue getting an error that the file isn't found. (2) I would like to start with row 2 because row 1 will contain the folder path as a result of another macro.
[Code].....
View 2 Replies
View Related
Jan 16, 2012
I have 4 different excel files in C:Reports (SupplierA.xls, SupplierB.xls, SupplierC.xls and SupplierD.xls) all with a page called "Summary" (like below) in a set range A2:F5.
Fruit
Monday
Tuesday
Wednesday
Thursday
Friday
Apples
2 4 1 7 8 Oranges
2 3 4 6 9 Lemons
4 5 6 6 6 Pears
1 2 3 5 5
I also have a summary excel file in C:Totals called "Supplier Totals" that has a summary page that I want to total up all my suppliers A, B, C and D (same as above A2:F2). How can do this in VBA?
I am using Excel 2007.
View 1 Replies
View Related
Feb 20, 2012
I have been opening files from another application which opens the files in memory as .XLS. I have not saved these to my PC. Is there VBA to merge all open .XLS files into another Workbook - preferably .XLSX.
View 1 Replies
View Related
Sep 12, 2010
I and my organization have many files created using Excel 2003. I have now upgraded to Excel 2007 and soon I discovered a huge problem.
- When opening a file using Excel 2007 that was created with Excel 2003 the links in that file is automatically updated even though I get the edit links dialog and choose not to update.
After searching for a solution on the Internet I realize that this is a problem that exist when Excel opens a file created in an earlier version. Microsoft has no solution.
I need to be in control of which links that are updated and not.
Going back to excel 2003 is not an option. Saving the source files in Excel 2007 is not an option.
View 5 Replies
View Related
Nov 4, 2011
I need to audit files produced by others based on a numerical sampling. For instance, I may need to audit every 5th file for one person, but every 12th file for person 2.
Does XL (2007) have an easier way to select every "Xth" file than numbering the lines manually?
View 4 Replies
View Related
Jul 15, 2012
I can find no code that actually works. It seems to me that there is a gap in the available functions.
I need to get a listing of files in a named folder, into Excel 2007.
View 9 Replies
View Related
Sep 28, 2011
I am having trouble getting Excel 2007 on my work computer to save as .xlsx by default.
I have opened the Office Button > Excel Options > Save > Save files in this format and selected "Excel Workbook (*.xlsx)," and if I save as before closing Excel then it works perfect and saves the file as .xlsx. However if I close Excel, re-open it later and save a new file the default "Save as type:" is "Excel 97-2003 Workbook (*.xls)" and if I open the save options again the "Save files in this format" option is reverted back to "Excel 97-2003 Workbook (*.xls)."
I have finally overcome the [Compatibility Mode] issue by saving a file named "Book.xltx" (not "Book1.xltx") in the two default locations "C:Program FilesMicrosoft OfficeOffice12XLSTART" and "D:Documents and SettingsusernameApplication DataMicrosoftExcelXLSTART" (we use the D: drive at work for personal files). I thought this would solve the save as issue but it hasn't. I have also changed the "Save files in this format" before saving the .xltx files in the locations to apply the settings to those specific files but that hasn't worked.
It is on my work computer so I am limited in what settings I can change because they have them pretty well locked down.
View 7 Replies
View Related
Jul 24, 2012
I'm trying to sort all .xls files in a folder by modified date. I want most recent at top because then I will be cycling through and using the most recent version of files that have similar names.
Excel 2007.
The code I have so far is this:
Code:
Sub autolink()
Dim folderPath As String
Dim FileName As String
Dim wb As Workbook
[Code]....
But I need something before it sort the folder by the modified (or better creation date) because there are several files with similar names. I know know, I could put a date in the file name and look for that but I don't control the naming of the files.
View 7 Replies
View Related
Jan 20, 2010
embed a audio file (.wav or .mp3) into a Excel Sheet and be able to have it play from a macro? I need the Clip to stay in the file not refer to a location on the pc and have it play from the sheet not open media player. Can this be done?
View 7 Replies
View Related
Aug 22, 2012
I am looking for something to calculate values based on the past three months. I already have written a macro to retrieve all of the data and just need this as an add-on.
for example, lets say it is 5/31/2012. I have a row with dates going like
10/31/2010 11/31/2010 .........
I want the formula to calculate SUM(march+april+may row 68)/SUM(march+april+may row 59)
I have an input tab where I can select the month, say 5, and get the periods.
3/31/2012, 4/31/2012, 5/31/2012
if I changed the 5 to an 8 it would get 6/31/2012 7/31/2012 8/31/2012
I don't know if i need VBA for this but I am trying to have something to calculate this depending on the period selected in the input tab.
I am using excel 2010. I am thinking something with an offset function and maybe a loop? but still not sure.
View 2 Replies
View Related
Sep 12, 2013
I need to develope a macro for Excel to calculate desired profit margin depending on our cost of each item. Here's the scenario.
A1: landing cost
If 0
View 4 Replies
View Related
Jan 27, 2014
In a macro I want to automatically insert a formula in several cells. The formula depends on other cells, and I want to be able to manipulate these cells with variables. Here is my code:
[Code] .....
All my variables are declared:
Sheets("DATOS YTD 2014").Cells(I, Semana + 1) is the cell I want to be able to chose due to the variables
Sheets("DATOS YTD 2014").Cells(I, 3) is the reference cell for the VLOOKUP formula, that will vary with I
SheetMonth.Range("B3:W172") is a range in the sheet SheetMonth which is fixed
The error message I receive is the following: "Run-time error 13, Type mismatch"
I precise that the next step is to make the ",6," part in the vlookup formula also variable... but I guess once my current issue is solved this one will be a piece of cake.
View 3 Replies
View Related
Mar 9, 2012
I am using Excel 2002 and have had a couple of files that seem to have become corrupted recently. When I try to open the files there is nothing there, no cells just a grey space where the cells should be. When I try to close Excel it asks me if I want to save changes when no changes have been made.
I had not made any changes to the sheets prior to this happening so am struggling to work out what is going on.
View 2 Replies
View Related
Dec 13, 2007
I have a Workbook that I use to log invoices and credit notes and it is password protected so that the cells that contain formulas are locked and therefore not selectable.
What I wanted to know is. Is it possible to lock other cells depending on what values are in certain cells?
Let me explain. I have Columns G & H which contain the heading 'Credit Note Number' & 'Credit Note Amount'. Now in columns I & J I have the heading 'Invoice Number' & 'Invoice Amount' respectively.
What I have done is to make a condional formatting so that If I put a value in cells in column G it will change the colour of the adjacent cells in columns I & J, likewise If I fill in cells in column I the conditional formatting will change the colour of adjacent cells in coulumn G & H. This helps me to see whether a row contains a credit note or an invoice.
What I would ideally like is for a Macro that would automatically locks cells G & H in a particular row that I am currently working on if I enter data into the cell in column I. Likewise if I am entering data in column G in the row I am currently working on for a credit note, then lock columns I & J in the row I am currently in.
Any Ideas how this can be done? Also can locking and unlocking of cells be done in VBA while the sheet is protected or would the macro need to temporarily unprotect sheet, lock the cells then protect sheet again?
PS: I have uploaded a Jpeg of what my conditional formatting does to try and illustrate what it is I need.
View 14 Replies
View Related
Aug 13, 2012
Using macro's on Excel 2010. What I'm trying to do is create a macro that will copy a range of cells from one sheet to another depending on a option being selected from a drop down box. I've tried to use formulas but without success.
sheet 1 contains a list of approx 20 people with rows containing sales figures per week.
Is it possible to have a macro that will copy the rows to sheet2 depending on the dropdown? The drop down has already been setup with people's names
E.g.
if sheet 1, cell a1 (with data validation setup) dropdown contains "mr smith", copy sheet2 row A1:A9 to sheet 1 cell a2
or
if sheet 1, cell a1 dropdown contains "mr cooper", copy sheet2 row B1:B9 to sheet1 cell a2
etc... for each name in the dropdown
The idea is so that i select a dropdown and it copies the sales figures that match the dropdown name, if i then select another dropdown, the corresponding figures are copied to the same place.
View 3 Replies
View Related
Nov 17, 2011
Working in Excel 2007. I am using excel for a data log (basically) and want it to format all empty cells in a row yellow if there is data in column A
Basically, If i have a value in A2, I want any empty cell between B2-G2 to be filled in yellow (as an idicator to the inputter that the cell needs to be completed).
there is already conditional formatting on these cells, which i want to maintain for the non-empty cells. I also have "0" as a value, so I couldn't use the basic conditional formatting setting it =0, it highlighted cells with $0.00, which i do not want.
View 5 Replies
View Related
Jul 7, 2013
I am trying to get two cells to be used to adjust other cells on the same sheet repeated times.
In a inventory sheet I have 5 columns as such , A1 previous balance, B1 Qty received, C1 qty on hand, D1 last cost, E1 current avg cost What I want, is to be able to enter my weekly received items in the B1 Qty received and the new cost in D1 Last cost cells and have them calculate my current average E1 and update my qty on hand C1 total. This in itself is not the biggest challenge. I was asking if there is a way that after the E1 current average cost and C1 qty on hand are updated by that formula, that the next time I enter a new B1 qty received and new cost in D1 Last cost cell they will update again basically without changing the earlier calculations achieved .
Example: Today I have item X with a A1 previous balance of 10 , with a D1 last cost of $1, and E1 current avg cost $1
I want to receive B1 10 more today at $.50 D1 last cost, which ideally would end up showing
A1 previous 10 (or 20 if adding) , C1 Qty on hand 20, D1 Last cost .5, E1 current avg $.75
Next week I want to receive B1 10 more at $.25 D1 last cost , which then would update showing
A1 previous balance 10 (or 30 if adding), Qty on hand 30, Last cost $.25 and E1 current avg $.58
View 4 Replies
View Related
Jun 1, 2009
I am trying to import a several files depending on date. The first part of the name of the files that I am importing are always the same, the end changes as the date changes.
I have a user form that comes up and I pick the dates that I am looking at.
What would be the code to import those depending on the date that I pick?
When my UF comes up, I pick whatever dates, I need to import all the files in between those dates.
View 11 Replies
View Related
Jun 3, 2011
I am using Excel 2007, and here is my scenario. I have a spreadsheet with a different sheet for each month of the year. I want certain cells in a month's sheet to mirror or be equal to the same cell in the previous sheet so that if I change the value of a cell in April, the same cell will automatically be changed in May.
An example is that I have a cell with the value of "Comcast". If I want to change that value in April to "Directv", I want it to automatically change in May, too.
Now I know that I can individually program a cell to be equal to a cell in another sheet and it will do exactly what I want. The problem is that I have about 60 cells in each sheet that I want to mirror the same cells in the previous sheet, and I don't want the entire sheet to mirror the previous one. So with 11 months/sheets with cells mirroring the previous sheet, individually programming 660 cells and switching between sheets to do that would take a very long time.
So my question is this. Is there any way to select multiple cells and have them all mirror the same cells on a different sheet without my having to program each cell individually?
View 5 Replies
View Related
Sep 22, 2012
I want to send via FTP to a linux server the following.
1- All files that are named checked.XXX.YY.mtc to path /var/docs
2- All files where the name begins with checked.conf to path /etc
PD: I have the IP address, user and password of the server.
View 1 Replies
View Related
Aug 22, 2014
I am absolutely new to VBA and trying to create a macro for work. We get daily files with almost the same headers that needs to be consolidated at the end of every month. The headers on the files are usually the same, except at times an extra column may be added at the beginning.
I need a macro to do the following-
Prompt to select the desired files.
Read the headers and append only the desired header columns from these files to a master file(these are Account, User, Modified By, Version). The headers are present in row A. Also, the master file should select the header from the first file only and hence take only the data (row B) from the second file onwards so that the headers are not repeated in the middle in the master file.
In the master table, add a new column at the end which will be the name of the file.
In the master file generated, filter on the column "Version" and delete all the rows except Version="1.0"
Lastly, there are certain values in the excel files that need to be changed. So I need a replace function to change those values.
View 2 Replies
View Related
May 16, 2014
I have a folder which has a set of files (Files may be anything like excel,pdf,word..etc).My rrequirement is: When i run the macro the first file to last file should open and wait for 5 sec and then close..I mean first time the first file should open and wait for 5 sec and close..Next 2 nd files shoul open and close after 5 sec..next third files should open and close after 5 sec...Like wise till last file..Is this possible to achive through macro code..
View 7 Replies
View Related