vba range

  1. K

    Excel VBA - trying to reference values of a range using cells

    I am trying to set the values of cells in a range in the current worksheet to be the values of an equivalent range from another worksheet using .range(cells... since the range size is variable This works perfectly: Range(Cells(2, "A"), Cells(ListSize, "A")).Value = Worksheets("Staff...
  2. J

    How to get the Range of Cells with "Values" within a Range of formulas

    I have a range of formulas (E12:O21) The Header Row is (E11-O11) - Total Row is (E21:O21). I want to use VBA to search that range of formulas and find the cells with values to return the "actual" used range within that range. I will use this new range to create a chart eliminating blank chart...
  3. C

    Repeat one table for each item in another

    I have a two ranges likes below: Range1 Product CPQ SalesforceIQ Quip MC_Advertising_Studio MC_Social_Studio DataCloud DataCloud Analytics Commerce_Cloud Heroku DMP_Krux Essentials Range 2: Countries Brazil Sweden UK Ireland Turkey India Philippines...
  4. W

    VBA - create new Sheet + fill data in cell based on list

    Hi, I have a VBA script running to add a new Sheet, fill it with a template (TEST Test2) and add the name of the specific employee based on a list. The employee data is located on worksheet RRAV, column K provides the name of the employee. What i want to do is populate cell B3 with the user...
  5. T

    Ever-changing ranges - define based on repeated cell contents

    Hi, This is what I need to happen, imagine these values in column B: Mon 1 Mon 1 Mon 1 Mon 2 Mon 2 Mon 2 Mon 2 Mon 2 Mon 3 Mon 4 Mon 4 Tue 1 I want to be able to identify when the value changes from Mon to Tue and create range definitions I can then use later on...so the resulting range...
  6. C

    How to simulate "End-Right & End-Down" in VBA?

    It seems as if this should be so simple, yet I am having such difficulty! Many thanks in advance for helping me see the simple-solution! I have a table of data in columns A-AD, beginning on row 2, which is the header row. Columns AE-BI contain formulas that I want to copy down to the last row...
  7. E

    User must fill in certain cells from a range before being able to save

    Hi, This is a follow up to a thread I've read here about values being entered into cells before being able to save the excel file. http://www.mrexcel.com/forum/excel-questions/433912-must-fill-cell-before-being-able-save.html The solution here is fine for one cell, but what I am trying to...
  8. H

    VBA sheet name and range

    Hi My question is: I have excel file with 10 sheets with different name. There is a range name "country" can be on any of the 10 sheet. I want vba code to pop-up mesgbox with "excel sheet name" on which range "country" is located thanks in advance...please help
  9. H

    VBA range

    Hi Sub LoopThroughFiles() Dim strFile As String Dim strPath As String strPath = Range("library_location") strFile = Dir(strPath) End Sub my question is how i can get text in range library_location to a string variable so i can mention path from excel and dont have to go...
  10. H

    VBA Range Check

    Hi, I want to write a function which checks that names in the range have range. Countries (USA, UK, Canada, Germany) USA (12, 01, 5) UK (50, 56, 5) Germany (34,09,78) So there are 4 members in range named "countries". and out of 4 members only 3(USA, UK, Germany) has range, Canada didn't had...
  11. H

    Excel VBA Range

    my code is in a below line(runs perfect): Set rngItems = Sheets("Sheet1").Range("Name_List") Problem is, I don't want to go into VBA and change every time, rather I want to do it from Excel window only. I wrote this code but it is giving me error. sheet_loc is a single cell range in excel...
  12. H

    Error 438. Excel VBA cells() = Excel.range()

    I have a code which is giving me error. (It is part of larger code) Dim XData As Excel.Range Dim nRow AS long Dim nCol As long ..... ..... For nRow = 1 To XData.Rows.Count For nCol = 1 To XData.Columns.Count .Cells(nRow, nCol) = XData.Cells(nRow, nCol) When I de-bug code line by line, it...
  13. I

    Storing a range of values and reusing

    Hi, I have a range of dates (that changes in size) so i have been using Dim myrange As Range Set myrange = Worksheets("Ending Unit Output").Range("D1",Selection.End(xlToRight)) How do I store the values of this range so that in another if statement I can simply paste/insert these values. I...
  14. M

    selecting a range in a macro

    Hi, I am trying to select a range in a macro where the first cell position will be returned by a formula. In excel =CELL("address",INDEX(E6:J6,1, MATCH(customer,E6:J6))) would give me $F$6 which is the location of the cell that has customer in it. I am trying to use it in a macro but keep...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back