vb code

  1. S

    Excel - VB code to default to print 1 page

    Hello. Hopefully this is simple. I have a file. text.xls... tab name is sheet1, I want to print just one page. I want it to default to do this everytime. Can I add VB code to do this? Seems like anything I do on the print screen, is not saved the next time I open it up. Thank you.
  2. V

    Formula or VB Code in a data sheet

    Hi and Thanks in advance i have post earlier some problem and get the solution but that was in complete and also i have lost that post url. Problem is, i have following sheet <tbody> Col A Col B S.No. Student Work 1 2 2 3 3 6 4 8 5 4 6 2 7 3 8 6 </tbody> In the above...
  3. V

    Permutation or Combination

    Thanks in advance I want to know that from the given (Query-1) numbers 0,1,2,3,4,5,6,7 (Query-2) numbers 1,2,3,4,5,6,7,8 how many combination we can generate without repetition and if possible pls provide the generated combination.
  4. V

    changes in vb code

    Hi all, i am using this code but want to few changes, please help Private Sub CommandButton1_Click() a = Worksheets(“Sheet1”) .Cells(Rows.Count, 1) .End(x1Up) .Row For I = 2 To a If Worksheets (“Sheet1”) .Cells(I, 3) .Value = “North” Then Worksheets (“Sheet1”) .Rows(i) .Copy...
  5. V

    VB Code or Formula

    pls provide code or formula for a sheet link is https://drive.google.com/file/d/1PS_zvcTpLhqOpa6uclRsh0O-IS0Hvveg/view?usp=sharing you can check the file so that all the points will be clear we need two results 1. After how many rows the digit comes 2. Highlight the cell when the value comes...
  6. T

    VB debug help!

    Hi all, I've got the below code running in my dashboard tab: Sub chart_visibility() ActiveWorkbook.Sheets("Dashboard").Activate If Range("A1").Value = "1" Then ActiveSheet.ChartObjects("Chart 3").Visible = False ActiveSheet.ChartObjects("Chart 1").Visible = False...
  7. J

    VBA to change background color of cell. color based on day of the month

    I have current code to change the background of the cell I updated "Today" to the color of the day. Today is the 15th of the month, so todays color is 15. What I am looking for is the "15" to change based on the day, so tomorrow the code would change to 16 without me going into the code daily...
  8. Johnny Thunder

    VB Code gets different results with different users? - Anyone seen this before?

    Hi guys, saw something weird today. I wrote code that goes into my network at work and grabs a file from a specified folder for our current month "03 - Mar" and does a copy paste to another report. The issue that I saw today is that if another user runs the file the macro is grabbing the file...
  9. M

    VB code to search according to data in search field.

    Hello, I have an excel sheet with several columns.Each column stands for specific historical data. I would like to search in the excel sheetover a search field (command button). A reset command button is planned toreset the sheet after every search and to empty the search field (commandbutton)...
  10. S

    help with existing vb code

    Need help modifying the code below to meet my requirements. Instead of having the InputBox prompt for Vendor No & Vendor Name and then saving to C:/. I would like to code to automatically use the file name I am converting into .CIF and store to a specified folder. Also, need the bottom part...
  11. T

    Vacation Time Error VBA Code

    Hello Everyone, I currently have a worksheet that will populate days with the initials of the Staff that has been assigned a task that begins and ends in a certain time frame. I've used an IF function for this. I now have another task I must do. My boss wants there to be an Error Message...
  12. R

    VB help in Combining Data from Multiple workbooks into a single workbook with same headers

    Hello Everyone, Is there a way to combine data from multiple excel files into one single sheet by appending data? All the files have the same headers. Also these sheets have drop down list and conditional formatting. Is it possible to append the original data with all the conditional formatting...
  13. L

    Need macro to search column A Sheet 1 for a similar match (about 6 common characters in the same order in the cell) in Sheet 2 then cut column B,C,D,E

    I have a bit of a complex problem that i have been having trouble fixing. We currently perform alot of data entry and i would like this macro to avoid doing it manually. We recieve a list from our client and in column A is a list of their clients. I need the macro to verify as close a match as...
  14. J

    Tewak in the VB code required to perform conditional tasks

    I am using the following code to calculate the Balance from the data, Balance = Demand - collection Sub DCB() Dim c As Range Dim lRow As Long lRow = 1 Dim lRowLast As Long Dim lRowDiff As Long Dim lRowPortion As Long lRowPortion = 1 Dim bFoundCollection As Boolean With ActiveSheet...
  15. G

    VBA Copy/Paste Worksheet Loop Object Error

    A newbie to VB coding here. I have a small piece of code that has me stumped. I am using Excel 2012. The purchase of the code is to allow the user to enter one Ticker symbol that resides in two Excel sheets. Each sheet has the ticker symbol in column A, date in col B, formula in column C, and...
  16. S

    need to edit and add vb code to excel sheet

    hi please use the version1.7 to add the vb formula in it. in modmain vb script hi i need to add a vb code in by vb script below eg- 1.data is in c1 out put to c3.,after first 2 digits the following 4 digits c3 =mid(c1,2,4) 2. data in c9, and c16 ,“open and Closed inverted...
  17. M

    VB Code To Move Entire Row Based On Cell Contents

    I pull weekly alarm reports. Each alarm has a different "Process States". The states include: active, inactive, completed and pending. I only need to see the "Active" alarms. The Process State is in column J. The raw report looks like this. The report is anywhere from 40,0000 to 60,0000...
  18. J

    Searching and unhiding specific worksheets using VB

    I have five worksheets hidden in my workbook. All of these worksheets have either "Yes" or "No" written in cell C4. (3-yes, 2-no) I also have a search bar in the form of a textbox and a command button. I want to be able to type "No" in the textbox, click the command button and have the pages...
  19. B

    Losing VBA when emailing spreadsheet

    Is there a way to send the VB code for buttons and macros with the spreadsheet when emailing from within excel? I have a button to send a spreadsheet through outlook, but when the file arrives at recipient the code and macro are not there.
  20. P

    Can rows/ columns containing merged cells be transfered to another worksheet through VB codes or other means.

    Hello, I've searched to try and find the answer to this question but not having much joy so any help will be greatly appreciated. I'm relartively new to excel VB codes and my seemingly impossible task is shown below: * I have a list of data each one has 6 rows of data. * (Rows...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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