active cell

  1. D

    How is it possible to determine the offset number---from an active cell---to the next column that contains data to the left of the active cell

    Hi Folks, Couldn't find anything on Google for this, so thought I'd ask. If my active cell was in D4 and the next cell to the left of D4 with a data value in was B4: Is it possible via VBA to determine the offset number from the Active cell (in this case -2)? My goal is to carry out a...
  2. D

    Moving a Sub-folder and its contents from one location to another location - both paths specified in a table, referred to by ActiveCell & offset

    Hi Folks, Basic goal: To move a folder and its contents into another folder that already exists. Detail: I wish to use VBA to move a single folder called 13) Customer Template (and all its contents including folders) from its current folder-path S:\Projects (5)\13) Customer Template\ to a...
  3. F

    VBA Sum from a specific cell to a relative cell

    Hi All I am looking for a little bit of advice for a formula in VBA. I created a macro but while testing it i noticed that this line of code was not going to be correct for all situations. ActiveCell.FormulaR1C1 = "=SUM(RC[-10]:RC[-1])" I would like it to sum from B3 to RC[-1] but of course...
  4. littlefish

    Macro Tweak - Selecting Active Cell

    Good morning. I have a spreadsheet with two tabs. One contains data that gets manually updated. For each row updated, I run a macro which copies the unique code ID (column F) to a second tab. The macro runs fine as-is, except in the cases where there are blank columns of data for any given row...
  5. K

    Move column from one worksheet to another based on active cell

    I have the following code that moves a row to the next blank row on a different worksheet based on the active cell that works great. Sub Shipped() ' ' Shipped Macro ' Move selected data to Opened Worksheet Dim rngsource As String Dim Rngtarget As Range Dim trow As Integer Dim Srow As Integer...
  6. D

    Pasting to a location specified within an active cell using VBA?

    Hi Guys, I am attempting to finish off a project for the team and wondering if VBA can achieve an unusual task. Goal: to copy the contents of cell (M3) in worksheet 2 into clipboard; thereafter, to paste the clipboard contents into a location in worksheet 1 i.e., into a cell which is specified...
  7. M

    Excel VBA Macro to change cell color

    I want to create a Macro and assign it to a button. This is what I want to happen: I select a cell that I want to be changed by the macro to have a certain color. When I click the macro button, the cell I had selected changes colors. I know you can do this by changing the background color of...
  8. H

    Referencing Data on Hidden Sheets

    Hello All, First time posting and I haven`t been able to find an answer to this on the internet so here it goes: Is it possible to have a cell reference data on a hidden worksheet? I have many reference sheets that I am hiding to clean up the workbook and I am finding it impossible to get the...
  9. F

    Paste values from listbox below ActiveCell

    hi, I have listbox. When user select item and click add, the value should be add to sheet: one row below where the current field is selected. 'Set addme = 'missing code For x = 0 To Me.lbsourceList.ListCount - 1 If Me.lbsourceList.Selected(x) Then...
  10. B

    Return column header of active cell.

    Can someone help me with a code that returns the column header only of an active cell to a message box. For example, if my active cell was AD21, I would want the msgbox to return the "AD" only.
  11. A

    Active Cell to have White Fill

    I have a spreadsheet that is mostly grayed out. I want whichever cell is currently active to have a white fill. Is there a way to do that without VBA, and if not, what line of code would do that?
  12. F

    Trouble with Setting Formula of a Cell on the non active sheet

    I am having trouble setting the formula of a cell on the non-active sheet. I have tried making the sheet.cell active and then setting the activecell.formula parameter with no luck. The place where my code is hanging up is bold. Sub MoveFinVIZ() Dim nRow As Integer Dim oRow As Integer Dim...
  13. T

    Getting active/selected cell in to a reference cell

    Hi. In my work I work a lot whit codes, Sometimes in multiple columns. but it’s hard to always know the code description. To get a clean excel sheet, I’d like to select a cell whit arrow keys ore mouse in these columns of codes and that the selected value is always displayed in a reference...
  14. M

    VBA Help: Select Range and Paste in another Column

    Hi All: In the below example, I am trying to look for populated values in Column A (range is A2:A5). If there are, (i.e. this would apply to A2 and A5) then copy/paste the corresponding row value from Col B into Col C. Initially, I tried to use =IF(A2>0, B2, ""). This worked, however I have...
  15. N

    How to Make a Cell that Just Changed the ActiveCell

    I have code triggered to run as soon as the user enters a number in a certain range of cells. Is there a way to make it so that the cell that changed in this range is now the activecell? So for example, if column A has the formula to add columns B + C and a user makes a change to B5 - how do I...
  16. T

    Help! Need to adjust selection code!

    Hi All, I need to adjust this bit of code (shown below) to select columns G, AO, and AR not just for the title column (row 7) and a single selected cell's row, but for multiple selected rows. With ActiveCell Union(Cells(.Row, "G"), Cells(.Row, "AO"), Cells(.Row, "AR"), Cells(7, "G"), Cells(7...
  17. K

    Help with VBA to Autofilter range of different activecell.values

    This is my current Autofilter VBA for activecell.value: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) ActiveSheet.Range("$A$2:$X$10000").AutoFilter Field:=1, Criteria1:=ActiveCell.Value End Sub What I'd like to do is be able to select a range of...
  18. W

    Macro to filter from values in column based on active cell

    I need some urgent help. I need a macro which would filter items within a column based on the entry that is on the active cell (as in the cell which is active). I came up with the following using the Record - but right now it is looking up the specific name "Adam Hill" - - I would like it to...
  19. V

    Finding Text in a String

    Guyz please, I need help in tweaking this code Sub Find_CIB() Dim rngRow As Range, rng2Cut As Range Dim what As String what = "CIB-OA" & "Scrubing Account" Do Set rng = ActiveSheet.UsedRange.Find(what) If rng Is Nothing Then Exit Do Else...
  20. E

    Adding points with an offset from the active cell

    I am trying to create a scoring sheet for a game we play at work. There are 4x different types of ways they get points and the only way I know to do this currently is to create 4x buttons for every row that add points to the appropriate column. If I can just get the base code I can make it work...

Some videos you may like

This Week's Hot Topics

Top