Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


Copy Active Cell

I have two worksheets with the same column. Would like to edit ex. sheet1 A1 and that sheet2 A1 updates automatically by copying just the value, not the reference.

View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Copy Range Into Active Cell
I have this code I wrote (combining variations of existing ones).. but not very well. unfortunately doesn’t seem to work. It copies the information back onto itself

View Replies!   View Related
Select And Copy Range From Active Cell
I want my code to evaluate each cell in column B, and based on its value, copy the row from D to X and paste on the newly activated worksheet. I'm trying to use Offset, but it's not working.

View Replies!   View Related
Copy Active Cell Down Adjacent Range To Right
Split from: Clear Range To Right Of Active Cell Down. I was working through this the first step was to clear the contents of the cells. After they are cleared, I have another sub that then goes and retreives a unquie number and places it back at the top of the column that I just cleared. Would this same code that cleared the cells contents work to copy the contents of the active cell down that same column, until the cell to its right is blank? -R-

View Replies!   View Related
Copy/Paste Automatically When Cell Is Active Of A Particular Range
can someone make a code for a range.Name = "match" as soon as active then that active cell is to be copied to cell C2.

View Replies!   View Related
Range Copy: Differ Depending On The Active Cell That's Selected
The rows will differ depending on the Active Cell that's selected and I don't know how to specify this.
The range I want to copy is from Column B to DA on the worksheet ("Staff") which I want to paste to another worksheet ("Leavers"). This is as far as I got

'FindRemove = lstRemove.Value
'If FindRemove = "" Then End

' Goes to the start of the Data column

' Tests current cell against FindRemove
'If ActiveCell.Value = FindRemove Then
'Call CopyPerson
'Exit Sub
'Else: ActiveCell.Offset(1, 0).Select
'End If
'Loop Until ActiveCell.Value = ""
'End Sub

View Replies!   View Related
Macro Run Copy Text From Active Cell And Find That Value In Another Sheet
I would like to create macro, where it would on macro run copy text from active cell and find that value in another sheet (in column H) and select that cell.

What I did is this:

View Replies!   View Related
Copy Cell From Specific Sheet & Paste To Active Sheet
I would like a macro that will go to a fixed sheet, copy the format, go back to the previous sheet and paste the format. My problems arise going back to the previously activated sheet rather than just a fixed sheet.

View Replies!   View Related
Copy The Active Worksheet
I have this macro created with macro recorder that makes a copy of my worksheet.

View Replies!   View Related
Copy Active Worksheets Into One New Workbook
I have 16 proposals that are either hidden or visible in a proposal generator. I need to be able to copy only the visible worksheets over to a new workbook that uses a name from a cell inside the proposal generator. Then a save as prompt to force the user to save the file wherever they choose.

View Replies!   View Related
Copy Data: Always Work With File A (active)
I open 2 files : A & B. Once I finish copying data from B into A. I close B and open C and so on. That means I always work with file A (active)

File B, C or D and so on has 3 worksheets with identical names. The filename of B, C and so on also has some common word

I'd like to copy data into sheet1 of file A, always same range : B2:B100 , afterwards I would copy-paste each result from sheet1 to another sheet of file A and delete the data in sheet1. So sheet1 of file A is always active and show the result each time the macro was run as follows.

Cell b2 of file A = cell c1 of sheet 1 of file B
Cell b3 of file A = cell d1 sheet 1 of file B + cell e1 of sheet 2 of file B

View Replies!   View Related
Copy Range Of Cells To Active Row In Second Sheet
Sheet 1 has data entered into it, it is then printed out as a jobsheet, saved and the data cleared. There are certain fields on this sheet that are eventually manually replicated onto sheet 2. The row in which they must go on sheet 2 will always be the 'activerow' on that sheet from a previous operation. It would make life so much easier and save lots of time if I could incorporate copying cells C10,C12,K8,K12,M2,C27 and C29 from sheet 1 to respective cells H,I,J,M,N,R,S of the active row on sheet 2 before I carry out the clear data process.

View Replies!   View Related
Copy Ranges From Closed Files To Active Workbook
I have a number of files in a directory, with data in columns A:E, and variable rows deep (200-300) that I’d like to copy to the active workbook. I’d like to have a file window open to the same set directory (ie. “CArchives” and be able to select any file in that directory to copy.

There are 2 separate ranges to copy, which must be done separately because the headings are to be moved 2 columns over - also, there is data in beteen the headings and main data in the active workbook.

Range 1: Two headings cells in A1:B1 get transposed to C1:D1.
Range 2: the files’ data starts at A4 but gets inserted starting at cell A6 of the active workbook.

View Replies!   View Related
Copy Data From Open File To Current Active Workbook
I want to create a standard macro that will copy values from a Master workbook to the current, active workbook I have open. The problem I have run into is when I record a macro it also records the name of the active workbook I'm copying data into and I would like it so when I bring up a workbook I just run the macro and it copies the values in. I'll be doing 8 different macros that each copy different values from the Master spreadsheet

View Replies!   View Related
Create Copy Of Active Sheet & Convert Original To Values Only
I need to copy the Selected Sheet (Sheet name will be different each month) on a spreadsheet and paste the copy to the left of the selected Sheet. Then I need to copy and paste values the entire sheet of the sheet that the copy was made from (the one on the right). I am very new to macros, and I tried recording and manually editing the macro with no success. The number of sheets will be different always as I will be adding this to different workbooks and also because new sheets may be added to any workbook at any time. I attached my code that I came up with, as I am not familiar with code enought to "[code]" my code.

View Replies!   View Related
Copy Of Active Workbook Path Stamped Onto Spreadsheet With Date And Time / Edit Check
1) I need to add an edit check
2) have a copy of Active Workbook Path stamped onto spreadsheet with date and time to create a visual record of where the file has been saved (described after the code below).

1) I need to verify that two cells (S7 and S9) are not blank before running my code below (=IF(OR(S7<>"",S9<>""),RUN CODE,"You must select your Provider or Division before you can save this document")).

- If both of these cells are blank a message box should notify the user that they must select the provider and/or division before they can continue with the save.

- If one or more of these cells are not blank the code below should run.

View Replies!   View Related
Find Method To Search For The Active And Non Active Values
I have a range of amounts in Sheet 1 from F7:Q13 and im using the find method to search for the active and non active values in the cell. Which means that if there's a value in the cell it will transfer the value in Sheet 2, if nothing is found in the cell the cells in Sheet 2 will return as nothing or null.

I think the problem lies on the FindWhat variable. Im getting a compiled error which im not sure what is it.

I've attached the spreadsheet so you get a better idea of the problem that i encountered.

View Replies!   View Related
Assign Active Cell In Macro With Dynamic Cell Choice
Before unloading a userform the range to select the active cell is set to

View Replies!   View Related
Identify Active Cell And Use The Column To Add Formula To Another Cell
I have a range of unlocked cells (B5:S10) that users enter data in. This sum of this data is then charted. The formula (sum) in a cell equals zero even when there is no data entered by the user. This zero is then charted.

I need to be able to plot the zeros if the user enters zeros but not plot the zero if the cells are blank.

What I was attempting to do is to use the worksheet change event to add the formulas to a cell so that the chart does not plot the value until something was added.

In my change event I need to know that a cell in the range (B5:S10) was changed and that if it was D7 (for example) that I need a formula enterd in D11 [=SUM(D5:D10)]. If it was I5 then the formula would have to go in I11 [=SUM(I5:I10)].

View Replies!   View Related
Go To First Cell In List That Matches Contents Of Active Cell
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...

View Replies!   View Related
Return Maximum Of Active Cell & Arbitrary Value To Cell
I am looking for VBA that will add the value of the current active cell on the sheet to the value in cell F12. The maximum value of F12 cannot exceed 1000. So if the value in F12 = 950 and 100 is the value in the active cell the maximum value in F12 should show 1000, not 1050.

It should do this on the click of a button.

View Replies!   View Related
Identify Cell Address Of Active Cell Selection
I have an embedded chart on my worksheet.I can select a cell behind the chart using the keyboard arrow keys.Is there a way of doing this using a mouse click,so that I know which cell i am pointing to/choosing?

View Replies!   View Related
Use Value Of Active Cell To Name Row
I'm trying to take the value of a cell and use the value as a name for the row.
If cell a1 has value = June. I want to change the name of row 1 to June.
I'm not sure what I'm doing wrong with the following code.

Sub Name_a_row()
Dim TheName As String
Dim RowNum As Integer
TheName = ActiveCell.Value
RowNum = ActiveCell.Row
ActiveWorkbook.Names.Add Name:="TheName", RefersToR1C1:="=Data!R&RowNum"

View Replies!   View Related
Add Active Cell Data To Cell By Clicking
I want to automatically put information from several cells into one cell, when these cells are clicked. Let's say that A1:J8 is the range were a cell can be clicked and if a cell is clicked in that range the value of these cells should be put in cell A9. If possible I want to avoid private subs in a worksheet. I preffer to have a macro running, so I can decide when to stop this routine.

View Replies!   View Related
BORDER Around Active Cell
I have a spreadsheet with DDE formulas in the cells. When the contents of any cell changes I want to DRAW A BORDER (NOT CHANGE THE BACKGROUND COLOR !!) AROUND THE CELL .. When another cell's value is updated I want to REMOVE the border which was around the"OLD" cell and now place a border around the most recently changed cell, etc.

Only the newest active cell should have a border around it !!!

View Replies!   View Related
Row Of Active Cell Selected
I know how to select an entire row, but if I want the "row" with active cell to be highlighted when I press enter, or the down arrow key, is there a way to do that (mainly for ease of viewing).

View Replies!   View Related
Active Time In A Cell
is there any way to have a running clock or time in a cell

like when you open up a sheet you see it click-by second by second

I would like this, so when i print the sheet it shows exactly what time it was when printed

View Replies!   View Related
Active Cell And Offset
ThisWorkbook.Sheets(2).Cells(nrow + 1 + j, 2 + high_count).Formula = "=VAR(" & ActiveCell.Offset(0, n_high_count -1) & "," & ActiveCell.Offset(0, -1) & ")"
*n_high_count is the negative of high_count

I want "ThisWorkbook.Sheets(2).Cells(nrow + 1 + j, 2 + high_count)" to have the formula "=VAR(XX:XX)" where the range is the current row second column to the current row current column -1.

View Replies!   View Related
How To Read The Name Of The Active Cell
When I am clicked inside a cell how can i with VBA get the defined named?

View Replies!   View Related
Message Box To Pop Up When Cell Active
I have used to code below to active message boxes for 3 different cells - however the 2nd and 3rd time the code is not working....

View Replies!   View Related
Reference Active Cell
I've got 3 columns say A,B,C. Column C (row1) = Column A (row1) * Column B (row1). I'm trying to apply this formula to all the cells in Column C. I've tried typing the following formula in all of column C. =OFFSET(ActiveCell,0,-1) * OFFSET(ActiveCell,0,-2)

Obviously the ActiveCell reference doesn't work. This would be simple in VBA but here on excel how would I reference to the cell itself where the formula is contained?

View Replies!   View Related
VB - Paste In Last Active Cell
I'm working on this Macro process - and I can't figure two things out.

1) How do I get it to past contents in the second blank cell at the bottom of a list in a specific column? IE - data in B1:B17, paste new list in B19. What I'd REALLY like, is for it to paste in B8, but if B8 used, THEN paste to the second to last blank cell in column B. (if thats even possible)

2) I have VB open an excel workbook, grab data, copy and then past into 1) (above), but then close that workbook. However it always asks "do you wish to save?" and "Do you wish to keep data on clipboard" How can I program it to say "no" for both of these windows prompts? Here's an excerpt of my code:

View Replies!   View Related
Finding The Active Cell
how to simply find out what the active cell is (This would be the cell the curser is currently in). It is already displayed in the Name Box on the menu in Excel, but I can't find a way to access this data automatically.

View Replies!   View Related
Change Active Cell Value On The Fly
I need to input a long list of steel sections in Excel. The steel sections have names like HEA200, HEA120, HEB 400, HEM300 etc.

I was thinking that this could be done easier by using codes for the section prefixes (HEA,HEB, HEM etc) and that the cell value would change automatically.


For example:

I input "1100" - this would change on the fly to HEA100
I input "2200" - this would change on the fly to HEB200
I input "5200" - this would change on the fly to UNP200

I know I could do this by using a lookup function in another cell, but I want it all to happen in the same cell.

View Replies!   View Related
Go To Last Active Cell Column
I have a macro where I sum a large number of cells in column AZ. How can I have the Macro end in the last cell of column AZ where the sum is located? The length varies in each file.

View Replies!   View Related
Use Active Cell For Row Number
There is a chart encompasing column A, B and C. The column D has certain numbers stored in its cells. All I wont is to build a code which would check the value of the cell in column D which is in the same row as the active cell, and then paste certain date into the active cell - basing on the value of the cell in column D.

Here an example:

Sub pasteif()
first one) column D has
'if the value is i.e 2 then it should paste into the active cell whatever there is in Range F1:G1
'if other value is present in this case in cell D1 (it is always the D column) then other range would copied into the active cell
ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub

View Replies!   View Related
Row Number Of Active Cell
I need to write code which would find the row number of my selected range (named 's')and then select the row beneath that.

View Replies!   View Related
Pasting To Last Active Cell
I'm trying to paste columns to the last active cell on another sheet and I'm doing something wrong.

Sub WPRFilterMacro()
' WPRFilterMacro Macro
' Filter and copy and paste WPR information into WPR sheet
Sheets("Data Sheet").Select
Selection.AutoFilter Field:=1, Criteria1:="Work Place Resources"
Range(Selection, Selection.End(xlDown)).Select
'This takes command activates cell G7 after being on D5, don't know why
ActiveCell.Offset(1, 0).Range("D2").Select

I'm trying to paste this column to the first non-active cell in column D, but the code is taking it down two rows and two columns down, depending on where the active cell starts. I would just start it on a certain cell, but eventually, there will be different starting points.

View Replies!   View Related
Sum Range From Active Cell To Last Used
I Have searched existing threads but cannot find the answer to my query,

As part of a longer macro, I want to sum all cells in a column which contains data. Each day the number of cells that contain data will vary.

I have tired specifying all the cells in the column which contain data as a range, by selecting the top cell and using the

Range(Selection, Selection, Selection.End(x1Down))

But I cannot get a SUM Formula of this range. If someone could show me the correct syntax to get a sum from a range like this I would be very grateful.

View Replies!   View Related
Highlight Row Of Active Cell
Is it possible to have a specified shading (say 50%) applied to all rows except the currently picked row and the header rows to allow a user to focus on inputting across the row? I'd use this in conjunction with " Move Selection After Enter" to "Right" so the user would stay on the same row. I've tried the Help function, but can't find anything.

View Replies!   View Related
Whole Row Of Active Cell Should Be Bold
The text of the active cell's row should be displayed BOLD. In other words, My cursor is on row 8, then this whole row should be bold. Is this possible ?

View Replies!   View Related
Delete Row Of Active Cell
I have a macro for deleting a row. I want iit to delete the row that I have selected, that is i if I mark cell B22 I want it to delete row 22. But it deletes the row under it, that is 23.

Sub Tabortrad()
Dim intRadnr As Integer
Dim intStartrad As Integer
Dim intSlutrad As Integer
intRadnr = ActiveCell.Row
intStartrad = ActiveSheet.Range("Första").Row + 1
intSlutrad = ActiveSheet.Range("Sista").Row - 2
If intRadnr < intStartrad Or intRadnr >= intSlutrad Then
MsgBox "Kan inte radera denna rad. Placera markören på en av bokföringsraderna mellan rad " & intStartrad & " och rad " & intSlutrad - 1 & "." & Chr(13) & "En ny rad kommer att infogas under den rad där markören står.", vbOKOnly, "Felaktig rad markerad".......................

View Replies!   View Related
Select Row For Active Cell
I need to select the row for the active cell without using an explicit RC address. I don't seem to be able to make the syntax work.

View Replies!   View Related
Range In Same Row As Active Cell
I'm looking for a piece of code, which would activate a certain Range i.e. the start of which would be in column A and the End in Column G. My problem is that the activated range of cells shuld be exactly in the same row as the currently active cell i.e. active cell B3 -> activated range A3:G3 .

View Replies!   View Related
Active Cell As Reference
I would like to fill data in table on another worksheet, lets call it Sheet2 that starts with the activecell from Sheet1 and then use offsets. The activecell changes, but the remaining offsets for rows and cells always remain the same. I am pretty sure , I can figure it out this out using VBA, but is there a formula way to do this? Either looking at the activecell from Sheet1 as a start or using formatting like bold the start cell?

View Replies!   View Related
Macro Copy Of The Active Sheet And Then Rename The New Copied Sheet
I'm trying to create a copy of the active sheet and then rename the new copied sheet to what's in cell O4, which is a formula (see below) and then paste value cell O4 in B3 of the copied sheet. However, when I run this macro it doesn't seem to like the second line where I am renaming the sheet (run time error '1004').

"O4" =DATE(YEAR($B$3),MONTH($B$3)+1,DAY($B$3))

Sub NewMonth()

ActiveSheet.Copy Before:=Sheets(Sheets.Count)
ActiveSheet.Name = Range("O4").Value
ActiveSheet.Range("B3").PasteSpecial Paste:=xlPasteValues
End Sub

View Replies!   View Related
VBA Code To Access Active Cell ONLY
I am trying to add a button on my spreadsheet that will give the person Access to one cell only. The cell in its normal state is Locked. The cell is ALWAYS in Column F of a sheet titled Master. The button is located on the sheet titled Master.

The real problem may arise in that once the person has access to the cell and they make their changes I need that cell to return to being Locked and the sheet once again Protected with Filtering.

Does this make sense to anyone? Can it be done and if so any suggestions?

View Replies!   View Related
Referencing Active Cell's Value From Another Sheet
I'd like for users to click in a cell in col A in a sheet named "Period7", have the cell value placed in cell C11 in a sheet named "Per7Report," and change the focus or active sheet to sheet Per7Report.

Can this be done simply by clicking in a cell, or must a command button be inserted into each cell (note - odd rows only) in col A in Period7.

on the code to do this?

Note that there is a formula in col A in sheet Period7

View Replies!   View Related
Return Active Cell's Location/row
I'm having trouble identifing a way to return a location for the position of the active cell. I've searched Excel help with "Position, location, return, activecell, etc." and I can't seem to figure this out. I know that it's possible, so that's why I'm on here!


Ok, say the active cell is currently "F1", and I need the location "F1" to identify the ROW to be used in a formula later, how would I go about that?

The current contents of cell "F1"' will be "REPLACE", but I need to change the words "REPLACE" in "F1" and other cells labeled "REPLACE" in column F to the following formula (where the "1" in "A1" is is the current row):

View Replies!   View Related
Change Active Cell Color According To Name Above
Here is a screen shot of what I have:

I want to be able to enter the name from the above 4 cells (B3,B4,B5,B6) IN THAT COLUMN, and have the active cell change color accordingly.

If I am in cell C7 and start to type "PUBLIX" It should turn red in color. It does not because the code looks to a specific cell (example: B3). What can I change in my code to give the results I desire?

I have conditional formatting code below I copied from THIS site:

Private Sub Worksheet_Change(ByVal Target As Range)
' Multiple Conditional Format
Dim rng As Range
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
' Adjust Format range to suit
Set rng = Range("B7:H74")
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
' Adjust conditions to suit
Select Case Target.Value
Case Range("B6").Value
Target.Font.ColorIndex = 50 ' Green
Case Range("B5").Value
Target.Font.ColorIndex = 3 ' Blue
' Case "Super"
' Target.Font.ColorIndex = 6 ' Yellow
Case Range("B4").Value
Target.Font.ColorIndex = 13 ' Purple-ish
Case Range("B3").Value
Target.Font.ColorIndex = 5 ' Red
' Case "Corporate"
' Target.Font.ColorIndex = 37 ' Light Blue
End Select
End Sub

View Replies!   View Related
Sort By Active Cell Column
I am trying to perform a sort based on the ActiveCell.Column

I thought my code would exclude the hearer rows, but presently it moves the header rows beneath the data

I tried
Header:=xlGuess as well as

Same result

What am I doing wrong?

Private Sub comp_mySort()

Selection.Sort Key1:= Cells(1, ActiveCell.Column), _
Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

End Sub

View Replies!   View Related
Copyright © 2005-08, All rights reserved