Macro - Type In Value, Fill Other Cells W/same Value If

Jul 25, 2007

Col D has list of order #'s, starting in row 9. Col M is for COMMENTS about each order. Order #'s can appear in Col D more than once.

What I am looking for is a macro that will automatically detect if I have entered a new COMMENT in Col M, recognise the order # in adjacent Col D, and put my new comment in other cells in Col M if the SAME ORDER # is referenced in adjacent Col D.

Example:

worksheet starts with:
Col D Col M
1234 x
123 xyz
1234 zyx
4321 zyx
321 y
1234 yz

If I type the letter "Q" into Col M in a row adjacent to order # 1234, the result should be:
Col D Col M
1234 Q
123 xyz
1234 Q
4321 zyx
321 y
1234 Q

I think I would need to put this macro into a Worksheet Change event but beyond that I do not know what I need. UDF? Macro?

View 9 Replies


ADVERTISEMENT

Type Once Fill Many

Aug 4, 2008

I am trying to type in a number and have it populate in specified areas like on Monday then go to the next Monday an in put of the same value.

View 8 Replies View Related

Automatically Fill From Dynamic List As I Type

Jun 10, 2009

I am not sure of what is it called, but I would like to be able to start typing in a cell and it to start giving me options until there is only one.

Right now I have 9 dynamic lists with anywhere from 5-20 names per list and I have a report form with multiple data validated drop down lists each pulling from a separate dynamic list. This works ok, but as the user tabs to a cell with the drop down, they must use the mouse to initiate the drop down and then select the right data. Even if the user types the right data into the cell, it will not pass validation. Is there a way to start typing and it to keep throwing away things until only one option is available and then be able to use the tab button to enter that data into the cell and move to the next cell? Or as another option how hard would it be to activate the drop down when the cell is selected and then use the arrow keys to select the right one and tab to the next cell? I would want to be able to tab through the cell if no information was needed from that dynamic list.

View 6 Replies View Related

Macro To Copy And Fill In Cells?

May 6, 2014

I'm using 3 sheets within one Excel file. 1st sheet (target) is called Offer, the 2nd one (source) is called Stock and there's a 3rd one that only contains a button to which i'll assign the final macro. Now, back to it.

I need to copy from Stock to Offer contents of the entire column (basically there are a few more in Offer, so i need to copy each one and place it in a different part). I need to copy from ROW 2 and paste in ROW 6. The length of the document varies, as it's connected to the database (now i can have 3800 rows, in the next hour 3765). Previously i just added an X to row 4500 ( i don't expect to EVER have more than 4000 lines) and just copied from 2 to 4499

Second issue is, on the Offer sheet i have to fill a column with a certain value. Again, it needs to start from Row 6, and needs to be as long as the adjacent column. To get a better idea, i have for example 3800 price lines, so i need the column next to it to be filled with 3800 rows saying GBP (this will be a fixed value).

Also, none of the codes above should exclude blank cells in the middle of the string. Last thing, seems some of the barcodes i have only have 12 digits, so i'll need to add a 0 in front of all shorter numbers to go up to 13 digits.

[Code] ......

I should be able to figure the rest by recording bits and pieces. The Save part is done already, i'm using

[Code] ....

I needed it in XLSX format, not XLSM so that suits just fine. I might need to add hour and minute as well but i can sort it out (as i said, i can do some stuff on my own but this one got me to the bottom).

View 2 Replies View Related

Macro To Fill Blank Cells

Nov 29, 2006

I wonder if soeone could change the following macro so that the bottomcell
is set to be as far down as there is content in Column "A". As it stands if I fill in blank cells in Column "C" and the last cell with data is say C10 it does just this. But if the actual last row with data in column "A" is A14 then cells C11, C12, C13, and C14 are ignored. C11, C12, C13, and C14 should be the same as C10 above them.

Sub FillBlankCells()
Dim topcell As Range, bottomcell As Range
Set topcell = Cells(1, ActiveCell.Column)
Set bottomcell = Cells(16384, ActiveCell.Column)
If IsEmpty(topcell) Then Set topcell = topcell.End(xlDown)
If IsEmpty(bottomcell) Then Set bottomcell = bottomcell.End(xlUp).Offset
Range(topcell, bottomcell).Select
Selection.SpecialCells(xlBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub

Other macros recognize the actual last row.... but have issues with columns formatted as Text. The macro above doesn't create problems with columns formatted as "Text".

View 3 Replies View Related

Auto Fill Value In Different Cells In A Row Using Macro Button

Jul 30, 2012

how to auto fill of same value in different cells in a row?

For Example:

A1 D1 E1 G1 K1
10 10 10 10 10

like that when i hit a macro button the values in the A1 D1 E1 G1 K1 must fill with A2 D2 E2 G2 K2

View 1 Replies View Related

Macro To Fill Cells Until It Reaches Reference?

Sep 20, 2012

I have some information in a column where I have different types of references in each cell with some blank cells in between. I am trying to write a macro that will go down the column until it gets to a cell containing the reference "THIS PAYMENTS" and then copy that cell reference down until it reaches a cell containing "Y-T-D AMOUNTS".But I want the loop to carry on until it reaches another cell containing THIS PAYMENTS.I want this to repeat for about 3000 rows See here before and after result.

Before
After
PERIOD
PERIOD

[Code]....

View 1 Replies View Related

Fill Alternate Cells Macro, All Sheets

Dec 22, 2005

Would like a script that will go to each sheet in the workbook, and fill in light grey background, each alternate row that contains data, EXCLUDING the 1st row (header row).

View 9 Replies View Related

Macro To Fill Cells Of Rows Based On Two Other Columns

May 28, 2014

Data file with few columns. There are groups of similar ID numbers in Column J. For a group of similar ID numbers in consecutive rows there is only one row that has a number greater than 0 in its Column L cell and the rest of the cells of Column L for that set of similar IDs is filled with 0s.

First for that unique ID group I need to find out which row is it that has a value greater than zero in its Column L cell.

Then I need to use that value to fill the rest of the 0s in Column L corresponding to that set of Unique IDs.

The process continues with identifying similar IDs in Column J and this time doing the same thing for their Column M. I have attached a sample file that shows the data and how the results need to look like.

See here Fill Cells.xlsx

View 1 Replies View Related

Macro To Fill Cells For Number Of Times With Value Divided

Jun 3, 2014

I need a macro to do the following

Assume A1 has 100 & B1 has 20

The macro should divide 100 by 20 & then fill 20 for number of times I get as the answer starting from B3 9 in this case its 5 times

E.g.: B3 , B4 , B5 , B6 , B7 should be filled with 20

If A1 has 200 & B1 has 50

B3, B4 , B5, B6 should be filled with 50

View 1 Replies View Related

Macro To Fill Blank Cells With Data In Above Cell

Dec 10, 2013

I have a small challenge, where I am trying to fill blank cells with the data from the last populated cell above.

However, I need it to be able to automatically recognise when a manual entry has beed actioned down the column and recalculate for below that cell with the new data.

The data in the cell is selected from a drop down. I want it to populate all the cells below, until the next drop down is selected. And automatically repopulate them all when it is selected.

E.g. Cell C8 has the value "DATA" selected, and everything below is autofilled with "DATA", but when I select cell C12 with different drop down list value "VALUE", all the cells below stay as "DATA" because they are obviously no longer blank.

What I need if C9 - C11 to remain filled with 'DATA" and from C13 to auto fill with the newly selected value "VALUE".

Need this to happen for as many rows and data selections from the drop down as needed (endless).

I have used:

Code:
Sub FillEmpty() Application.ScreenUpdating = False Application.Calculation = xlManual Dim cell As Range For Each cell In Intersect(Selection, _ ActiveSheet.UsedRange) If Trim(cell) = "" And cell.Row > 1 Then cell.NumberFormat = cell.Offset(-1, 0).NumberFormat cell.Value = cell.Offset(-1, 0).Value End If Next cell Application.Calculation = xlAutomatic 'xlCalculationAutomatic Application.ScreenUpdating = False End Sub

which does the auto fill, but won't change the cells below once one of them has been updated.

Info:

Drop down list has 31 possible selections at the moment

Starts at Cell C8

Needs to be flexible enough to add an indeterminate number of rows, and additional items to the drop down selection.

View 1 Replies View Related

Excel 2003 :: Run Macro And Fill Out Cells When Country Is Selected?

Jun 8, 2014

I have a dropdownmanu in sheet1 with different countries taken from Column A in Sheet3. I need a macro to run when i select a country example Denmark. It will fill out transmittal code and also country code in named cells for it in sheet1. Info taken from Sheet3

Transmittal code is in below testsheet in Sheet1 cell E12.

Country code is in Sheet1 cell.

But this have to be possible to change. Also the range for the country have to be possible to change.

This vba code i need to run as soon as i select a country in the dropdown manu.

But one thing i would like to solve also is. When i select a country it will create a dropdownlist in I13 taken from the info in column, i have in Sheet3 column F. So if i select example Denmark, it will show a dropdown menu in sheet1 I13, with the ledger codes 10 and 6x. I have tried to make this work but cant make it work good.

I use excel 2003. Please have a look and upload the testsheet back.

View 14 Replies View Related

Can I Fill Non-adjacent Cells With The Fill Feature? (example Listed)

Nov 7, 2008

how to enter data in non-adjacent cells using a fill command.

Here is what I am trying to do:
in the column, I am holding ctrl button to select every 10th cell down the sheet. I need to enter a date in every selected cell that is exactly 7 days apart, i.e., 11/7/08 then 11/14/08 then 11/21/08, etc.... but no other dates or data.

I have tried to figure out a way to do this other than manually, but am confounded.

View 9 Replies View Related

Userform To Control Macro Features. Macro = Search For File Type

Jan 26, 2009

I have a macro that I found somewhere on the net to look within a folder and list all the files of a certain file extension.

The macro to do this is in the attached example and is called 'Get_File_Names_Within_Dir_ext'.

I have created a basic userform outline, 'UF1' for the user to define:
Select File Extension
Select Folder to Search
Destination Sheet

I just don't have any idea how to sync the two.

If you type 'exe' into 'TB1_File_Extension' of 'UF1' the macro should search for '*.exe' files within the specified folder.

The search folder 'RefEdit1' box should open a windows explorer box (or some such) so that the user can select the directory in which to search for the previously specified file extension.

'TB2_Destination_Sheet' is a text box for the user to type the sheet within the workbook in which to list the files found within the specified directory.

'CB1_Find_Files' should activate the macro to find any files for the specified criteria.

There is also a Button 'Find File Types' in Sheet1 of the file which should activate the userform 'UF1'.

View 14 Replies View Related

Asymmetric Fill (fill Out Column B Referencing Column A, But Only Incrementing By 1 Row In A Every 2 Cells In B)

Feb 1, 2010

Is there some easy way to fill out column B referencing column A, but only incrementing by 1 row in A every 2 cells in B?

Example:

Column A:
A1 = 1
A2 = 2
A3 = 3
etc...

Column B (I would like to fill this, referencing column A):
B1 = A1
B2 empty
B3 = A2
B4 empty
B5 = A3
etc

View 4 Replies View Related

Specifying Chart Type In A Macro

Jan 26, 2009

I recorded a macro where a xyscatter graph is produced with markers connected by lines.

Is there a way to change to to force the graph to be a xyscatter graph without lines?

View 4 Replies View Related

Link Two Cells Where If I Type Say Loubie In One It Duplicates In The Other

Jul 9, 2009

1. I need to generate 1, 2, 3 etc automatically when data is recorded in other cells on the same row

2. I need to link two cells where if I type say Loubie in one it duplicates in the other.

Hope these requests make sense I'm desperate for help tonight with this due to having to complete this project by the morning.

View 9 Replies View Related

Format Individual Cells To Type In CAPS

Jul 29, 2009

how I can format individual cells to put text in caps. I have found how to format the whole worksheet, but I only want certain cells to do it.

View 9 Replies View Related

Concatenate Macro Type Mismatch Error

Mar 12, 2014

I am attempting to concatenate several columns and I am getting the Type Mismatch error. I understand why I am getting this error, but I do not know any other way to accomplish what I am seeking.

[Code] ......

View 9 Replies View Related

Macro To Split String Returns Type Mismatch

Aug 5, 2013

My code below returns a type mismatch? It is looking at the values in column B which are formatted as text and the output is in column J. An example of a value is 2.1.15 I want to extract 1 (i.e. the central character between two ".").

VB:
Sub ConvertLineNo()

Dim r As Long, TempStr As String
For r = Cells(Rows.Count, "B").End(xlUp).Row To 1 Step -2
TempStr = Cells(r, "B")
TempStr = Split(TempStr, ".")
Cells(r, "J").Value = TempStr
Next
End Sub

View 3 Replies View Related

Macro That Will Select Certain Record Type And Calculate Information?

Apr 2, 2014

I am trying to come up with a way, and do not know if it is possible. In the attached spreadsheet, I am looking to find a way that will automatically filter a group of records from the f column (all CC, all 2ndR, all NA) then calculate the information in in Columns G and H and place it in the appropriate box in D-21 through D 37. Example. I want all the rows that ONLY have CC in Column F. Then take the information from those records in Column G and column H. I want the sum of Column G in D21/2 and Column H in D23/4. I

View 2 Replies View Related

Type Mismatch Error - Extracting Number Macro

Jul 14, 2014

"Type Mismatch error" in the macro below. I am trying to implement logic, where if value in column F, equals "1ma+89", then extract 89 only in column G. I also have other values in column F, where I have set specific rules for them, to extract numbers.

I have attached a worksheet with example data and highlighted red cells, represent incorrect output from the macro.

test2_14July.xlsm

View 4 Replies View Related

Macro To Compare Colors In Cell And Type Result

Feb 6, 2014

Like u see in attachment i have products in cells wich are painted in different colors. I need to compare two numbers of different product, and write result to column "Type D,C,B". If one of two products is without color/white or they are not the same color then result is always "D", if both products/cells have same color and different number then results is "C", if the color and number is the same then result is "B"

Below cell B2 I will write numbers by hand, when I finish and start macro it will compare first cell B2 and B3 and write result to C3, then compare B3 and B4 and write result to C4 and do that until there is any number in column B:B.

Attached File : excel help.xlsx‎

View 8 Replies View Related

Recursive Division Macro Mod Needed For Char Type

Nov 11, 2008

I need a slight mod to the below code which works perfectly otherwise. What it does is it divides whatever is in column K by 30 and puts in its relative cell in column M( There a bunch of mini tables below each other with blank rows in between).

The thing is sometimes there are characters in column K like "N/A" for instance and the macro crashes since its only designed to take into account numerical and blank cells in column K.

View 6 Replies View Related

Vlookup Type Macro Autorun Upon Any Changes Made To The Spreadsheet

Feb 13, 2009

I have a warehouse of skids with multiple boxes of barcoded documents on each skid. The tab "Warehouse Inventory" has the range of barcodes in each box on a given skid (boxes are numbered, skids are lettered). Under the Search tab, I will be copying a list of barcodes into Column A, from another spreadsheet, and would like a macro, to autorun upon any changes made to the spreadsheet, that will do a VLOOKUP type search and reply back in Column B and C the skid letter and box number respectively

View 3 Replies View Related

Macro Open Program Type Password Then Enter

Feb 20, 2012

I open a program using code

Code:

Call Shell("C:Program Files...
After this is open i have to type my password, how can i create a macro to open the program as above then type my password then hit enter.

to sum it up

i can open the program

i need code to type in the open program and hit enter.

View 4 Replies View Related

Conditional Macro Code With Error TYPE MISMATCH

May 4, 2007

im making this macro code for my cell that will have a conditional formula but im always getting an error pop up message: TYPE MISMATCH.

here is my code

Sub ACCOUNTFINDERCODE()
Dim LastRow5 As Long
LastRow5 = Columns(7).Find("*", searchdirection:=xlPrevious).Row

If Sheets("working file").Range("g11:g" & LastRow5) = "F1212014000" Then
Sheets("working file").Range("k11:k" & LastRow5) = "='Account LookupSheet'!R4C3"
End If

If Sheets("working file").Range("g11:g" & LastRow5) = "F1212015000" Then
Sheets("working file").Range("k11:k" & LastRow5) = "='Account LookupSheet'!R5C3"
End If

View 9 Replies View Related

Excel 2010 :: Color Fill A Range Of Cells If Specific Cells Not Blank

Feb 7, 2013

I am using Excel 2010 and basically i am trying to fill a range of cell with a green color if any value was enter in a specific cells. Example: I would like to fill range: A10:c13 with a green color (regardless of the cells content in this range) if a value was entered in cell C10 or C11 or C12 or C13.

I've tried conditional formatting but unfortunately I'll have to apply formatting for every cell and for a range of over hundred cells is not efficient.

View 7 Replies View Related

Fill Empty Column Cells With Reference To Adjacent Cells

Aug 11, 2008

I would like a macro that when run, finds empty cells in a column within the used range and fills them with the same formula in the other cells in the same column but relative to the row.

I have a basic understanding of VBA so if someone can set me on the right track i'll have a go myself as i appreciate this would take a while to write out from scratch.

View 9 Replies View Related

VBA Functions: Type # For Date (Type:=?)

Oct 22, 2008

1. Is there a VBA Function equivalent to the FIND() function, If so What is it?
2. Let's say Im Putting a Date into a inputbox, what is the type # for date (Type:=?)??

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved