numrows

  1. D

    Transpose VBA not working

    Hello All, I am having an issue with this little piece of code. For some reason it is only transposing the information every other line and has been driving me crazy. I am still pretty new to VBA, so any help would be greatly appreciated. Dim numrows As Integer Dim counter As Integer Dim x As...
  2. H

    Excel VBA Function to Loop from Cell upto top of Range

    Hi Guys, Looking to create a function which allows you to select a cell and then run a For loop against each cell inside the range from the selected cell to the top of the column. I.e. if I select cell C5 it will run a for loop against C5, C4, C3, C2, C1 in that order. The formula calculates...
  3. B

    vlookup VBA not working!!!

    Not sure what the issue is.. hopefully someone can help!!! Heres my code: Sub Test() Dim SeriesName As Range Dim LookupRange As Range NumRows = Range("A1", Range("A1").End(xlDown)).Rows.Count For x = 2 To NumRows Set SeriesName = Series3.Range("A" & x).Value...
  4. T

    Unexpected Value Returned on Count

    Public NumRows As Long The number of used rows on Worskheet 1. Variable is public because multiple macros use it. Private Sub Workbook_Open() NumRows = Worksheets("TableSize").Range("A1").Value MsgBox "NumRows = " & NumRows End Sub Calculates the value of the variable NumRows, which is the...
  5. T

    Macro Runs Even When Criteria not met! Excel Vba

    My code is supposed to run only if n > NumRows. n is the number of rows in my worksheet. I calculate the number using a formula in another spreadsheet at location A1. For the purposes of this post, that number is 30. My code: 'Sheet where row number is calculated, 30 for this example Private...
  6. S

    looping help?

    hello, i am new to VBA coding so i might be headed in the wrong direction with this code. i am trying to build a loop that loops and X amount of times or untill the column is empty. here is what i have so far: Sub Test1() 'UpdatebyExtendoffice20161222 Dim x As Integer...
  7. C

    Hiding Rows based on user input

    Hey Folks, By default I display 100 rows (rows 21 to 120) In cell I19 I ask, how rows do you want to see? Lets say the answer is 10, but it could be later changed to 15, or 3. Based on that, what would the syntax be to hide rows 31 to 100 and have the hidden rows hide/unhide based on the...
  8. C

    VBA to read both row & column numbers from cells

    Hi, I have the code below that selects a range from cell BM76 using the row number from the value in cell BJ68 but the column is fixed as BU. How can I adapt this code so it also reads the column number from cell BJ71 rather than it being fixed as BU? Any help much appreciated. Dim numrows As...
  9. R

    How can I define/refer to this range without string concatenation?

    I have a table (ListObject) with a fixed number of columns and a variable number of rows. The table is a perfect grid except there's a column that is empty for some rows and not for others. I sort the table on that column to separate the rows with values in that column from rows with empty cells...
  10. R

    Run Time Error 13 Type Mismatch

    Hi, very new to vba and this forum, which has been very helpful. I have some code that works perfectly but always gives a 'Run Time Error 13' and stops the macro from completing. Any help please? 'Delete a row of data Dim rngSrc As Range Dim NumRows As Integer Dim ThisRow As...
  11. L

    Need Help Deciphering this Code

    Hello, I just had to learn VBA for my internship this summer due to a project I had to do. The project is basically figuring out how a pre-built model works. Thanks to Google and previous questions/guides in this forum, I've been able to figure out the bulk of the model, except one Sub (below)...
  12. L

    Need Help Deciphering this Code

    Hello, I just had to learn VBA for my internship this summer due to a project I had to do. The project is basically figuring out how a pre-built model works. Thanks to Google and previous questions/guides in this forum, I've been able to figure out the bulk of the model, except one Sub (below)...

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
Back
Top