Multiple Actions For A Cell
Feb 7, 2014
I am currently using a product formula in a cell and was wondering if I could add a round up/down action to numbers containing decimals? For example, let's say that my cell values are 300, 327.6 and 355.2 after using the product formula. Is it possible for those values to reflect 300, 328 and 355, respectively?
View 5 Replies
ADVERTISEMENT
Jul 17, 2009
I have a list of petroleum accumulations with three types of data: Reservoir depth, Net Pay and Gas-oil ratio. for each accumulation, the number of reservoirs within each can vary. So I may have a accumulation with only one set of those stats, or an accumulation with 20.
I need the program to go down an alphabetized list (8000 entries long) and after every unique accumulation name average the values of the stats(which are in three separate columns) then put it in one row perhaps beginning in Column M or another sheet. So that I have a list of accumulations with the average of those stats, one entry per accumulation name.
View 5 Replies
View Related
Sep 10, 2012
This Coding is correct for CheckBox49. This code Changes the Color of one Cell from Black to white and the cell below it from white to black...(its a dipswitch) when the check box is checked... When its unchecked it does the opposite....
Code:
' ACM 1 Switch 1
Private Sub CheckBox49_Click()
If CheckBox49.Value = True Then
Range("AC24").Select
With Selection.Interior
.Pattern = xlSolid
[Code] ........
Now what needs to happen is this.... I'd Like to have this Happen if checkx49 is checked...
Code:
Range("A1,K50,K51,R50,R51").Select
Range("R51").Activate
With Selection.Interior
.Pattern = xlSolid
[Code] .......
If Checkbox49 is unchecked do this... Put in D26 Reader Name? in Italics.
Code:
Range("K50,K51,R50,R51").Select
Range("R51").Activate
With Selection.Interior
.Pattern = xlNone
[Code] .........
Also...what ever information is entered in D23.
Put that in F50 with RDR at the end...
Whats in D23 Put in F51
Whats in D23 Put in M50 and concatenate with a space from cell U49
Whats in D23 Put in M51 and concatenate with a space from cell Y49
Lastly code to select K50, K51, R50, and R51...=Len whats in F50, F51, M50, and M51 when the box is checked...and dont len when the box is unchecked.
View 6 Replies
View Related
Apr 28, 2009
I am trying to use following codes for a add-in utility so that user can enable or disable logging activity for a given workbook.
My problem is to how to add the following code to a new workbook so that "Loginfo" function could be activated. I have tried some application... based commands but it do not seem to be working.
View 6 Replies
View Related
May 2, 2009
I have made an class and created a file to log when user change value or insert formula in a sheet get recorded in a file C:Logme.csv. The problem is it is recording the value and formula at random i.e in some instances it records the value and in some instances it is not recording the value and formula in logme.csv . I am unable to figure out why this is happening?
View 3 Replies
View Related
Jun 16, 2006
I wish to perform different actions depending on whether certain errors are present in a cell and I can't figure out how to do it.
Attempt (within some For loop):
othCell = ActiveCell.Offset(-95 - counter, 0)
If othCell = CVErr(xlErrNum) Then conditioncount = 0
This generates a "type mismatch" error. I also tried othCell.value in place of othCell on the second line; I don't really follow the distinction in usage for "value". I've also attempted this with Error 2036 in place of CVErr(xlErrNum). I don't know much at all about VBA!
View 2 Replies
View Related
Oct 3, 2008
Is it possible to have a conditional cell based on the actions of another cell in a second database sheet.
For example: A single excel file contains two database sheets. If any characters are entered into cell A1 of sheet 2, then cell A1 of sheet 1 turns grey.
View 4 Replies
View Related
Jan 18, 2014
I need to repeat the following two actions one after another therefore I cannot use F4 key
The actions are :
1) select some cells in two rows and colour them yellow.
2) select the last two cells of the rows ans merge them.
these are one after another where F4 will repeat only the 2nd step but I need the 1st step of colouring.
Are there any short cut keys or method or recording to repeat the above steps when necessary.
View 1 Replies
View Related
Jul 3, 2014
I need to assign two actions to a one button.
1. action: Copy Column A, paste to Column C
2. Write time&date into G5
I am only capable of doing one button for each action using the macro recorder and simple code:
[Code] .....
View 2 Replies
View Related
Jul 15, 2014
I am working on trying to make a macro I wrote run faster, and I understand that one way to do this is to stop certain actions from occurring. However, I am having a hard time understanding what stops what, specifically among these:
[Code] ......
View 2 Replies
View Related
Oct 4, 2009
I need to insert code into an existing macro that does each of these two similar actions:
If a specified word is in the heading (row 1 cell) of a sheet, DELETE that column
If a specified word is in the heading (row 1 cell) of a sheet, BOLD that column.
View 9 Replies
View Related
Sep 20, 2007
Is there a structure inside of Excel which keeps track of all the actions taken by a user (something that would presumably be used to allow for an undo sequence)? If so, is there a way to get access to it?
View 2 Replies
View Related
Jan 15, 2014
I want know the formula for below issue. I have number of of actions done for each day for a month or more.
If I select a particular period for example 01jan14 to 10jan14 i want to get all actions done in this period.
View 2 Replies
View Related
Dec 30, 2009
I have a series of macros altering various workbooks and sheets. They're numbered Step1, Step2, etc. In my Step5 I have a series of Case statements in a macro, and I don't know how to get it to do what I want next. I have NOT tried running this code yet, and I'm sure I have something(s) wrong in it.
1) If the selection in DstWbk, sheet "Steps", is "01DSP" through "11DSP" the macro needs to delete specific columns in the SrcWbk, and then move to the next step (6).
2) If the selection in DstWbk, sheet "Steps", is "*DSP" the macro needs to go directly to the next step (6)
3) If the selection in DstWbk, sheet "Steps", is anything else the macro needs to flash a generic "No Data found" message and move on to Step7.
The part of the code that's throwing me begins at 'Select only the specific regional data' and ends at the "Case Else MsgBox"
View 3 Replies
View Related
Sep 26, 2013
I'm using a Private Sub Worksheet_Change(ByVal target As Range) macro on Worksheets(2) to perform certain actions when a selection from Worksheets(1) is pasted to Worksheets(2). Before ending the Worksheet_Change sub I'd like it to deselect the copied selection on Worksheets(1). I've tried to do this by selecting Worksheets(1) and moving the cursor, but VB ignores the "With Application.Worksheets(1)" instruction. Removing "Private" from the sub heading makes no difference.
Is it possible do this with a Worksheet_Change routine? If so, how?
View 7 Replies
View Related
Jun 15, 2009
Macro: the system monitors changes to the spreadsheet and then performs actions accordingly. Example: If the value of column c = Bug, then it sets the value of G to Celeste and Column H to Kewill.
Could this macro be changed so that instead of having to enter "Celeste" in this code, it could set the value of column G to the value found in H5 on the sheet?
I tried replacing "Celeste" in the code with H5 but it did not work.
Private Sub Worksheet_Change(ByVal Target As Range)
'Declare variable
Dim iCol As Integer
'Look at the column number of the changed cell (Target)
Select Case Target.Column
'Column C
Case 3
Select Case Target.Value
'if "Bug" set iCol to 3 (Red)and change value of column G to "Celeste" and Column H to "Kewill"
Case "Bug": iCol = 3
Target.Offset(, 4).Value = H5
Target.Offset(, 5).Value = "KWL"................
View 9 Replies
View Related
Dec 8, 2006
I have written a macro which references to several different sheets and cells therein. The macro is assigned to a command button on 'Sheet 1'. When I click the command button, the screen flickers and the user can see the macro running all the commands I have written. Is there a way of stopping this - maybe replacing it with a static screen view whilst the macro runs?
View 3 Replies
View Related
Feb 25, 2009
where exactly to add the code under Tools > Macro > VB editor.
My version: Office XP Pro ("2002")
The first code I need should be simple. I want Excel to copy cut delete files from the hardware, using data from a workbook.
There are 3 sheets:
1. "Names" - contains picture file names (without the JPG extence) in one column,
2. "From" - contains a cell with the original path to copycutdelete from
3. "Target" - has a cell with the target folder path (in case of copying/moving).
I made it in 3 sheets for making it user-friendly, since unskilled users will use the method.
I need to have 3 hyperlinks in the first sheet: "Move (cut)", "Copy", and "Delete", and by pressing the matching VB code eill be activated.
The second code should output (and print, if possible) data from a line to a pre-defind sheet.
Let's say there are 4 columns: picture file name, name of photographer, description of the photo, and the date it was taken.
There will be in the end of every line a cell with a hyperlink called "Output photo details" to output the data to specfic cells in the Print sheet (e.g. the date goes to D7, the name goes to A3, etc.). An important thing I wanna output is the picture itself (like from "Add > Picture" ment, in a location I define in the code.
View 9 Replies
View Related
Apr 2, 2009
I have a workbook that is used to track overtime hours worked through the year. I've received some help from users on this forum, and others, to create the necessary macros and formulas to allow a supervisor to make use of the form; however, the workbook is also used to track those that wish to volunteer to work overtime each weekend. The sheet has a list of names for the employees on each shift, then a column to allow a "Y" to be placed under the date - designating them as a volunteer for any overtime available. I've found this spreadsheet (attached - from this site) that will allow individual users to access the workbook and have unique passwords for each. I don't completely understand how it works, but I feel it may be a start to getting what I want.
Essentially, once the user selects their name and inputs their password, I'd like the workbook to be opened and then allow them to only manipulate the row associated with their name. That row will change from week to week, so specific numbers will not be able to be used, but their name will be the same as the name used in the logon.
I feel like I'm asking for a lot here, so just some initial guidance on whether this type of thing is possible would be an acceptable answer.
View 9 Replies
View Related
Jul 20, 2009
I have this formula - a vlookup. If the returned result is N/A how can I make it return 'No Actions' =VLOOKUP(A2,FRACA_Pivot_With_Actions!A:D,4,FALSE)
View 2 Replies
View Related
Apr 17, 2014
I was asked to parse and chart some data files. The data are obtained from a data acquisition system sampling a pressure transducer at about 300 samples per second. Since the start of the pressure event is created by a chemical reaction, there is no easy way to gauge when the the event will begin. As a consequence, the data acquisition system is left running continuously while waiting for the event.
Needless to say, at 300Hz, the data file grow very large, quickly. The data preceding the pressure event are close to zero and can be removed simply by using code which deletes rows with values less than a given threshold. An example of this code is:
Code:
Private Sub CommandButton1_Click()
Dim rng As Range, cell As Range, del As Range
Set rng = Intersect(Range("B20:B500000"), ActiveSheet.UsedRange)
For Each cell In rng
If (cell.Value) < 0.15 Then
[Code] ....
There are other operations that need to be performed as well. My question is whether if I have a workbook open with this and other code, will Excel allow operations on one or more open workbooks from this workbook? I would think that you can because you can move or copy a worksheet to another open workbook.
View 5 Replies
View Related
Mar 18, 2013
I maintain the data flow at my work. We send and receive the data using excel files with specific formatting that I then upload to the database. Each time I send or receive the excel file I must log them, this is what my code question refers to.
I use RDBMerge to merge all the contents of the 100 plus excel files into one worksheet. The first part of the macro cleans up the merge data for use in the log (i have attached an example of the clean data and finished log).
The blue shaded area of the "Raw_Data" is what the clean data looks like, the yellow column is what current macro records for each record.
As you can see by the example the Raw_Data is only two files LL_LLL_BOB_ToLLLLL_20121228_01 & LL_LLL_BOB_ToLLLLL_20121230_01, each with more that one record.
The log code in column "H" Is based on this criteria:
First Letter of the Unique ID in column "E" - O, M, or L
Program Type in Column "F" - U or R
1. O-U = U
2. O-R = RU
3. M-U = U2
4. M-R = R2U
5. L-R = R
You will note that Columns G-R of the "Log Sheet" correspond to the "Record Type" found in Column "G" of the "Raw_Data" sheet.
This is the area where my skill at using scripting dictionaries fails.
The results for the log list each file only once, but the log code for each corresponding "Record Type" in columns G-R of the "Log Sheet" must contain each unique instance of the code. In other words
if LL_LLL_BOB_ToLLLLL_20121228_01 contains an O-U with an "A" Record Type and an M-R with an "A" Record Type; then, on the log sheet there needs to be the codes "U/R2U" in the cell intersection of the LL_LLL_BOB_ToLLLLL_20121228_01 record row and "A" column (which is column "G")
So, If the File contains one of each code for each Record Type the corresponding cell must house one of each code separated by a "/" without any spaces. This means the cell value could no code, or one code and all the variations in between to all five codes. Also, for ease of human reading the log codes should be concatenated in the 1-5 order that I listed them in (U/RU/U2/R2U/R)
Here is my code so far.
VB:
Option Explicit
Sub test()
Dim dic As Object, a, i As Long, rng As Range, e, w, n As Long
Set dic = CreateObject("Scripting.Dictionary")
[Code].....
View 1 Replies
View Related
May 6, 2014
I would like a macro to be able to save 26 tabs within the one document to individual PDFs.Preferably I would like to be able to specify each time exactly which tabs get printed, because often I don't need to print all 26, just the first 10 or so.I would like each PDF to automatically be named with the value in cell E10 of each tab.E10 already has a formula to create its final value. It references cells from other tabs within the same document. Hopefully the fact that this cell has a formula in it won't affect my ability to use the resulting value as a 'save as' reference?I would like it if the PDFs save to the same location as the Excel sheet from which they're generated is located. The location of the excel sheet will change every three months, so I'd prefer not to specify a location with a specific filepath, as it will have changed by the time I run the macro again.
I am using Excel 2010.
View 5 Replies
View Related
Aug 31, 2012
I have a worksheet entitled 'Data'. In this worksheet there is a table consisting of 4 columns plus relevant data:
TABLE 1:
Project
Benefit Type
Delivered or Enabled
Benefit
PJ1
Financial
Delivered
Saving of $4M over 24 months.
[code]....
I have been trying to create a formula that will enable me to pull data from the 'benefit' column(column D) so that the cell contents populate in a single cell in a table in a different worksheet.
TABLE 2:
Financial - Delivered
Financial - Enabled
Tech - Delivered
Tech - Enabled
Green - Delivered
Green - Enabled
[code]....
So, as an example, I am hoping that a formula can be created which pulls the text from relevant cells in column D when criteria from columns A, B and C are met e.g. Tech benefits that are Delivered in PJ2 would populate cell E3 ('Tech -Enabled') in Table 2 with:
Continued maintenance of hardware.
Increased capacity.
View 1 Replies
View Related
Feb 1, 2012
Worksheet 1: In column A I have a people's initials. In coumn B I have text boxes with miscellaneous text. (The same person could have multiple rows within this sheet.)
e.g.
AAA blue
BBB orange
AAA round
CCC smelly
AAA elongated
Worksheet 2 I want to show:
A2 = initials, B2 = first text box associated with that person, C2 = second text box (different row) associated with that person (if applicable), D2 = third text box (different row) associated with that person (if applicable), etc.
e.g.
AAA blue round elongated
BBB orange
CCC smelly
View 3 Replies
View Related
Apr 28, 2012
I am having such a difficult time creating a macro that will reduce the 5+hours I have to spend each week manually copying & pasting all of this data. I making an IMMENSE difference in this worker bee's life!
I have a workbook with two sheets (Sheet1 & Sheet2). Sheet1 has license #'s in column A and the state that the license belongs to in column B like this:
COLUMN ACOLUMN B11111Alaska11112Alabama11113Arkansas11114Arkansas
Sheet2 has three columns. Column A has the license #'s, column B has the state that the license belongs to and Columns C shows a line-of-authority tied to that license #.
COLUMN ACOLUMN BCOLUMN
C11111AlaskaProperty11111AlaskaCasualty11112AlaskaLife11112AlaskaHealth11112
AlabamaProperty11112AlabamaCasualty11113ArkansasLife11113ArkansasHealth11114
ArkansasLife11114ArkansasHealth12345ArizonaProperty
I'm trying to write a macro that will compare the license # and state in Sheet1 to the license # and state in Sheet2. If it matches, append the contents of Column C to the corresponding row in Sheet1.
Here's the thing...Sheet2 contains the entries for all licenses in the company (so this table is HUGE). And there are multiple entries for each state license # (notice how there's two entries above for AK license # 11111 - one for the Property line and one for the Casualty line.
After my macro is run, I want Sheet1 to show all the lines-of-authority on a single line. So if I ran my macro on the above example, after it's run I would have this in Sheet1:
COLUMN ACOLUMN BCOLUMN
C11111AlaskaProperty Casualty11112AlabamaProperty Casualty11113
ArkansasLife Health11114ArkansasLife Health
View 5 Replies
View Related
Mar 11, 2014
I have a spreadsheet with 1,000 rows of data.
Each Cell in Column A has a different long text string.
I need to see which (if any) of 10 specific small text strings exist within each long text string. Depending on which small text string is found I want to return a 3 digit code. If no small text string is found I want to return "Not Found"
E.g.:
- Cell A2 contains "randomtext,randomtext,APPLE,randomntext"
- I want to see if Cell A2 contains any of the words APPLE, ORANGE, CARROT.
- I want to return "APP", "ORG", "CAR" or "Not Found"
Q: What is the most elegant way to accomplish this within a single formula that I could paste into each cell in Column B?
View 2 Replies
View Related
Jun 17, 2014
I need to convert data from column IDS into separate rows, all other columns need to stay in tact. There are several distinct patterns for the IDS column, main identifiers are always starting with FILER or TEAL and the trailing numbers behind it have no more than 6 digits.
BEFORE MACRO
ID
AREA
TYPE
CLASS
QTY
IDS
1
COAL
TYPE9917312
CLASS881345
2
FILER756911**/**FILER123188 ^** FILER877119*118
[Code] ........
AFTER MACRO
ID
AREA
TYPE
CLASS
QTY
IDS
1
COAL
TYPE9917312
CLASS881345
2
FILER756911
[Code] ......
What the MACRO would look like? This is for Excel 2010.
View 3 Replies
View Related
Jan 15, 2013
I am looking to split multiple different entries in a single cell into multiple columns and repeat this for all rows
Example (I have the below in a single Cell as column headers)
NCM Server Mgmt VLAN Site ID
Next Line down is the data (Each row in a single cell)
Enabled 10.10.10.0 50 TEST SITE 1
Enabled 10.10.20.0 50 TEST SITE 2
Disabled 10.10.30.0 50 TEST SITE 3
How I could achieve this as I have a number of projects where this would become useful
I know you can use delimiters but with spaces between the values I just can't fathom a way forward.
View 12 Replies
View Related
Oct 30, 2009
I’ve got a folder on drive C named “Customer Sheets”. In this folder at any time there could be over 500 individual customer sheets. i also have a "Summary Workbook" on drive C
What I need is a macro in my "Summary Workbook" that copies cells (“B3, B6, B12, B13, G5, G6”) form every customer sheet in my “Customers Sheets” folder and paste it into my “Summary Workbook” onto sheet2, every customer in a new row.
The “Summary Workbook” should run this macro every time it is opened or on my command so that the database is continually refreshed when a new customer sheet is made.
View 2 Replies
View Related