select case

  1. A

    Percentage Color Coding Question

    I have a column of numbers (in percentages) which is a part of a pivot table. I need to color code this column as follows: - Percentages above 95% "Good" - Percentages >= 90% and lower than 95% "Neutral" - Percentages < 90% "Bad" I would like to use Excel Styles for colors. I have written...
  2. C

    VBA to Hide Rows

    Hello, I am wanting a macro to automatically run when a spreadsheet is opened to check a cell to see what month it is then hide some rows off the back of that. It should look something like the below saying if C5 is one of those months then hide rows 12-18 in the sheet Check List. Private...
  3. T

    Select Case - Squishy spot on forehead

    After digging through umpteen references - I'm still trying to figure out what I'm doing wrong here. Per the comments in the code: I have a workbook where on one worksheet there is a named range - _FST with a drop down select for yes or no. Based on the answer I want to perform a SUM of 40 -...
  4. A

    Multiple Statement Select Case

    I have been trying to search how to do this and have not come across anything that helps me with what I am trying to accomplish. I have seen select statements with multiple conditions, but not multiple actions. I am trying to replicate a calculation based on if the action is done daily. I am...
  5. G

    Looping Through Select Cases

    Hello All, I have a independent combobox and a dependent combobox, the dependent combobox depends on the information provided in the first independent combobox. I know there is the select case to make fill the dependent combobox. Here is a brief overview what my code does. I have two...
  6. B

    VBA Help. Select Case based on worksheet name

    I have three different macros that make various format adjustments. 1) intacct_CMA 2) intacct_events 3) Intacct I'm trying to consolidate the three macros into one by using a Select Case Statement based on the Worksheet names. I would like for: - macro #1 to run on the worksheet named...
  7. Manuel Cavero

    Multiple case <>

    Good morning or afteernooon to everyone: I've this little piece of VBA code that it's not working: Select Case PAc_ALACase Is <> 5, Is <> 10, Is <> 15, Is <> 20, Is <> 25, Is <> 30, Is <> 35, Is <> 40 Do whatever End Select Where PAc_ALA is an integer. Anyway, I tried in a different...
  8. S

    use range variable in command to set selected cells all uppercase

    I want to select cells and turn them upper case. the cells selected will change each time. I have tried a few things and had no luck the first way it did not want to do it bc I think my use of the range variable in the actual command is not right. 'set range based on selected cells Set...
  9. W

    Range.currentregion and offsetting a case to range count

    Hi everybody. I've been tinkering with a small code section using the Currentregion and trying to offset a case based on it What I was hoping for, was a currentregion.rows.count = x, lets say 10. Then for each of those 10 rows, it would apply the cases below on offset(0,12) and (0,13). I...
  10. G

    SELECT CASE with several CASES

    Hello, This is a continuation of a previous post, but I thought I should start a new thread since this is about SELECT CASE. (https://www.mrexcel.com/forum/excel-questions/1021927-excel-vba-use-consecutive-if-statements-use-if-elseif.html) I'm now using SELECT CASE code to do 2 things: 1)...
  11. M

    VBA - Cut and Paste from Select Case

    Hi all Trying to have Excel move a pieces of data from a sheet called import to another sheet called format, however the below code comes up with either "PasteSpecial method of range class failed" or "Cut method of Range class failed" when it tries to copy inside the select case portion. I've...
  12. B

    IF Statement Or Select Case Help Please

    Good Morning Guys, I hope you are all well. I am just in the process of setting up a new part time employee on a Holiday Spreadsheet I have made which uses NETWORKDAYS to determine the amount of holiday the user is after. So when the User selects for example 12.04.17-13.04.17 that would be 2...
  13. J

    Brand new to VBA trying to use Select case function

    I am trying to use the Select Case function. I'm currently running into a run-time error "9". I know I am probably missing some basic VBA info, but I cant seem to identify what it is. here is my code Sub HistoryPull() With Worksheets("Data and Forecast-Prelim") Select Case Range("I6")...
  14. T

    VBA Concatenate two columns after select case

    Hey guys so I have a large set of data. The macro I have right now looks up the name of the person then goes about 15 columns to the right which has people/ gift in the format X / Y, and the column after that has a list of ages Z. What I need to do is fix up the data so it says X People(Person)...
  15. T

    VBA Combining Select Case with Private Sub for data management

    Hey guys, so I'm trying to fix a set of data column by column. So for example I have <tbody> Pass Score Age Gender No 40 21 Male Yes 92 19 Female Yes 87 45 Male No 69 60 Female Yes 72 37 Female </tbody> and I want <tbody> Pass Score Age Gender N 40-49 20-25 M Y 90-100 15-19...
  16. S

    Sorting Copying and Pasting By State Abbreviation

    Hey guys, so here is my code: Public Sub newcopy() Dim WSCount As Long, StartCellRow As Long, i As Long Dim sht As Worksheet Dim region As String WSCount = Worksheets.Count - 2 Application.ScreenUpdating = False For i = 3 To WSCount + 2 region = Sheets(i).Range("E1").Text...
  17. F

    if column does not contain value then do not create pivot table

    Hello dear Excel users, I wrote a macro that is creating 3 pivot tables, all in separate sheets, from the same table (table1) in the sheet RAWDATA. The last pivot table must be created only when at least 1 row in table1 in column K is containing the word TRUCK. If no rows exist with the word...
  18. madkinson

    SELECT CASE: Case Is a Value or Blank

    I have a portion of a SELECT Case statement that I want to fire based on whether there is a value in the cell or whether it is blank (see HIGHLIGHTED): Select Case Range("T" & ActiveCell.Row) ' Action Case "Removed" Select Case Range("R" & ActiveCell.Row) '...
  19. G

    VBA Target Address Select Case Issue

    Hi all, need some help as I do not know VBA. I have a form that my company uses to hire new folks. One of the cells is a Organization selection drop-down. Because of what other items are in that column I cannot re-size the whole column but want the drop-down to be wider when it is selected...
  20. R

    Select Case Target.Address for range of cells

    Hi I have a working code to make a calendar pop up when ever someone selects a specific cell. However I would like to make it work for whenever a cell in a range is selected ("G2:G3000 "I2:I3000" "J2:J3000 "L2:L3000") or anywhere in column G, I, J, and L. The code I have at the moment will...

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