Insert/Add New Worksheet When Cell Value Matches
May 24, 2008I am trying to write/ find a macro that will open a new worksheet when Y is entered into a specific blank cell;
View 7 RepliesI am trying to write/ find a macro that will open a new worksheet when Y is entered into a specific blank cell;
View 7 RepliesI have a column O with the heading "Return Visit Required". Each cell, starting in row 5, has data regarding a job. So each row represents a different job.
If the cell in a certain row in column O has a value="Yes" then I need 1 row added below that cell. If the value="No" or "" then do nothing.
I need the value "Yes" to be non- case sensitive.
I am working a project where I need to copy/insert a Row of data onto Sheet 3 if values from Sheet2 are located on Sheet1. Here is my code so far:
Option Explicit
Sub move_rows()
Dim ws As Worksheet
Dim ws1 As Worksheet
[Code].....
I need a formula or VBA macro to do the following:
I have 2 worksheets, namely sheet 1 and sheet 2.
Sheet 1 contains data in columns A to H.
Sheet 2 contains data only in column A.
I want Excel to check the data found in column A of Sheet 2 with those in Column A of Sheet 1. Hence, when an exact match is found in Column A of Sheet 1, Excel will delete that entire row.
This is a continuation of thread 182629 [URL] ....
The End User wanted originally to type characters into cell C1 of a worksheet that the macro searched for in another worksheet, copying across every row containing the input.
The responses gave me the following code which worked perfectly:
VB:
With Sheets("PICKLIST")
myFind = "*" & .[c1].Value & "*"
End With
If myFind = "*" & "" & "*" Then Exit Sub
Unfortunately, the user NOW wants a Text Box instead of putting the characters into a cell.
I added a textbox (originally called 'TextBox2' but renamed "Choice") and "Dimed" CHOICE As Range.
Then tried the following code:
VB:
With Sheets("PICKLIST")
myFind = "*" & CHOICE & "*"
End With
But it generates a "RunTime Error 91" - Object variable or With block variable not set.
I have posted in a existing thread at mrexcel as i believe my problem and possible solution is very similar to that already detailed there. However i have not recieved a response there yet and was looking to draw upon more minds here ...
View 9 Replies View Relatedis it possible to have a cell return all matches from a list and have the list of matches reduce as you type, then be able to select one item from the list? this is a typical feature on internet sites, but can it be done in Excel?
View 3 Replies View RelatedI have a spreadsheet which has a source worksheet, containing 2 columns with thousands of client numbers and account numbers. I have a destination worksheet which contains certain account numbers which are featured in the source sheet.
What I need to do is pull the matching client numbers across from the source sheet into the destination sheet. An example is attached.
I have several worksheets (Labeled Sheet1,Sheet2,sheet3) What I need to do is to step through each row in sheet3, and do a search in sheet1, it the data was found, then return the row number. I then will need to copy data from sheet1 (rowfound columnA , through rowfound CoulmnBd to sheet3 current working row columnK
View 3 Replies View RelatedIn my spreadsheet, on the first worksheet called "Working". Column A, called "Results", contains carrot ^ delineated string values in each cell (i.e."john^apple^pear^banana^grape^love^heart^pickle"). The majority of string values in every cell in my "Results" column match a "source" column of Pick-List Values, called "Fruits" in the same spreadsheet, however found in a different worksheet called "Lists" (also in Column A). I want to perform 3 functions against my "Results" Column on worksheet "Working":
1.) Report In Column B: Analyze column "Results" by cell and return carrot delineated string values for only those that match my "Fruits" Pick-List
2.) Report In Column C: Analyze column "Results" by cell and return carrot delineated string values for only those do not match my "Fruits" Pick-List
3.) Report In Column D: Identify and return all unique values in "Column C" as a List.
Attached is a simple example of what I'm trying to accomplish called " Sorting.xls"
when I insert a row into the sheet called WBS - Explanation, it only copies over into columns A:D in my worksheet called Timeline & Key Tasks. Unfortunately, I need the whole row to be inserted in the Timline & Key Tasks worksheet.
I can see how the coding has been set up and why this is happening, unfortunately I don't have the knowledge to workout how to change it to the code to include the whole row without deleting information, which I don't want to do.
I have written a vba program that creates a report in excel. Most of the pages of the report are created at runtime. I have an image on a hidden worksheet that I need to place into one of the worksheets that is created at runtime. The image is an excel chart that I copied and pasted as a picture. I did this so that I could resize it easily and all of the elements of the chart would maintain their relative sizes. I have tried:
View 2 Replies View RelatedI have one column that contains a monetary amount (column AQ) , and another that contains text reading either "inflows" or "outflows" (column AC)
When AC says "inflows", AQ should be positive, and when AC says "Outflows", AQ should be negative.
I need the text in column AQ (the monetary amount) to become red when the the opposite is true.
i.e. When AQ is negative and AC says "Inflows", AQ should become red. And when AQ is positive and AC says "Outflows", AQ should become red.
I have a master data sheet with four columns, A, B, C and D
Column A has the primary data and B,C,D has dependent data values;
So when I insert a new cell in Column A with cells Shift Down, I want mandatorily new cells to be inserted in the same row in col B, C and D as well so that data integrity is maintained;
I am just learning to use VBA and this may be the most simple task ever, but I can't figure it out. I've searched for all of the keywords I can think of, but can't find a solution...
I have a list of names in a sheet. Other columns in this sheet contain data like amount charged, amount paid, etc. This sheet must be manually updated (because the other program won't export the information I need) periodically to ensure proper billing/payment application in the original software (all transactions are handled by other people that I don't trust).
I sort the list so that the all names that are the same (ie John Doe) are together.
A short example list looks like this:
Jeremy Apple
John Doe
John Doe
John Doe
Jimmy Kravitz
Jimmy Kravitz
In updating my sheet, I set up a macro that will input todays date in one of the columns for all occurences of that name (so, every row that contains John Doe in column B, column V will have todays date in it).
Currently, in order for my macro to work properly, I have to manually make the activecell the first occurrence of 'John Doe'. When I'm ready to update 'Jimmy Kravitz', I have to select the first occurrence of 'Jimmy Kravitz' and so on.
Here's my question - Is there a way to use a VBA macro to find the first occurrence of 'John Doe' (and automatically 'know' which name I am updating)? Basically, I need a macro that will take the information that is in the cell in column B in the active row, find the first row that has that same name, and make that cell (column B) the active cell...
So
Client Ref
a212198
a312365
a412546
a512355
a612656
a712198
a812198
a912198
a1012355
a1112355
a1212355
There is a tab a tab called client
so in b2 i want basically say if a2 matches a column in the client tab columns A:A then paste the username which is stated in the client tab in columns B:B
I use the following code to insert a row of set parameters in one of my worksheets.
View 10 Replies View RelatedI was wondering if it is at all possible to insert one worksheet into another one? Specifically, I have a report that I have created, but someone requested a section at the top that would require completely different sized columns than the rest of the report uses. Is it possible to embed another sheet into this report so I can resize the columns without it affecting the rest of my report?
View 6 Replies View RelatedIf A1 ever equals "1", I want Sheet 2 to automatically be displayed.
View 1 Replies View RelatedSo basically if in the tab (Inet Summary Costings) has 17346 in column H:H then I would like it to paste all the rest of the columns that match up with 17346 in H:H
View 1 Replies View RelatedI have worked on the code – with as limited knowledge as I possess – to perhaps communicate my intention. I know for a fact that in the code below there are 2 problematic lines – and herein lies the root of my problem. The first line is: “Dim Day As String” In Debugger speak, I am told that this cannot be done along with “Set sh = Worksheets(Day.Value)”. However, in normal speak, I am trying to copy data from one sheet to another. When pasting the data on the second sheet, I am trying to make the code find the appropriate sheet that matches a Day value in Cell I5. Getting the code to execute this one action is proving to be particularly difficult. I am thankful for any suggestion on how to get the code to work correctly.
View 14 Replies View RelatedI have two worksheets, one named Data and one named Index. In column G of Data, there is an index number. In column G of Index, there is a list of special index numbers.
In columns A:F there is information about each special index numbers.
What I need is in Data, if the index number of column G exactly matches the value of a special index number in Index Column G, put the column A:F information for that row in the row with matching index number in Data.
Data Worksheet
A
B
C
D
E
F
G
1
header row
[Code] ......
I need to be able to put the formulas in A2 to F2 and just drag the formula down all ~5000 cells of Data, and only need the information put into the ~ 20 special rows, determined by the index number in column G.
I would like to return in column E if the person purchased another package before using all their product up. There are multiple accounts in column A that has a similar set. I need a formula that keeps the used date unique to the account # as well.
Account #
Unique
Purchased
Amount
Used
1561645994
1234
[code]....
Worksheet full at Column IV how can I insert more
View 1 Replies View RelatedTrying to find a code which will insert all images into specified cells.
[url]
All of the images are in a single folder C:/My Documents/Pictures
All are .jpg images which contain the prefix EV_
ie: image1 is called EV_10020003.jpg
image2 is called EV_40B00001.jpg
image3 is called EV_C003001.jpg
etc.
Throughout my worksheet I have cells containing text of an image
ie: in F23 contains the text EV_40B00001
in G50 the text EV_C003001
etc...
My aim would be to use a command button to search through my worksheet (Sheet1) and load up each image to their corresponding cell.
I have a approximately 17 workbooks, all with multiple worksheets within. I have a logo that I now want to add to each worksheet in every book.
What I would like to do is the following, on each worksheet.
Add 13 rows starting from the top A1 (this is to make room for a logo I want to add)Add the logo JPG file (which covers the range A1:F13) . This will be the same picture for all sheets. The picture properties should be "Locked" and "Don't move or size with cells". The path of where my logo is stored is C:UsersGrantDropboxEffExAdminLogosEffEx_logo-05Then select the entire contents of the workbook and uncheck "Locked" from the format control.Then apply protection (which leaves the picture locked) but allowing selection, inserting and formatting of rows/columns.
This will allow the users to still format columns and rows eg. autofit columns, but they cannot select and delete the logo.
I have tried using the Macro Recorder but when I select all sheets, I see that it records the actual sheet names and so this will obviously not work for when applying to other workbooks. Also, it did not record any of the Protection commands which I did.
how I can do this?
Can I get a macro to insert a new worksheet each time it runs and rename it to a value held in a cell on another tab eg Sheet1, cell A1 - this value will change each time the macro runs so there wont be any duplicated tab names ?
I have got a worksheet called data with values in column M7 to M31 which are only there if they meet a criteria >0
if there is a value in cell M9 only, i would like to select the value of M9 and also the description in B9 and insert this into another worksheet called W1 on row C43 and i43 and repeat on C44 and i44 if values are >0 in M11, this would create 2 rows and would expand if there was more matches >0
I have a workbook with a worksheet called Summary that has formulas that refer to other worksheets (say A, B, and C) in the same workbook.
What I want to do (with VBA because I have to do this many times) is copy this Summary worksheet into several other workbooks, all of which also have their corresponding worksheets A, B, and C.
I do *not* want the copied Summary worksheet's formulas to refer to the old workbook. If I copy the worksheet by hand, this is what happens.
Instead I want the copied worksheet's formulas to reference the worksheets of the workbook they are now in.
Count all the true statements in column A (Work) of sheet1 (Checklist), once counted insert that many rows on sheet2 in a specific location, I found a count formula just don't know how to do the insert rows part
Code:
Sub CountRows()
Dim Rng As Range, CountTrue As Long
Set Rng = Sheets("Checklist").Range("Work")
CountTrue = Application.WorksheetFunction.CountIf(Rng, "True")
End Sub