vb code

  1. J

    How to Copy data from one sheet to another

    Hello Guru's, I am new to this form and VB macro i need help .. I get a file where i have some data , its as below if the total dr is not equal to cr then i want the data to be copied to a new sheet ...how can i create a macro for this ? <tbody> Line Account Desc dr cr dr cr 1 123 test1...
  2. R

    simple percentage increase to the quantity in VB

    Hi guys, Can anyone help me with this ?? My original VB code is ElseIf brand = "MAC" And year = "2013" Then Profit = 22 / 100 * cost * quantity ElseIf brand = "Rimmel LONDON" And year = "2013" Then Profit = 31 / 100 * cost * quantity ElseIf brand = "REVLON" And year = "2013" Then Profit...
  3. S

    VBcode for adding a LOOKUP formula

    Hello all, I am relatively new to the VB code for Excel macro and wanted to get your advise on the following macro.. '=== CODE START === Sub c_SLCodeThisWk() Dim t As Long For t = 2 To 100 Range("AR" & t).Formula =...
  4. E

    Button in sheet1 with macro, copied to sheet2 and sheet3, is not working

    Hello guys, I have this macro code in Sheet1 assigned to a button named Combination. I copied the whole sheet twice and moved to end. So they have the same data content and hopefully the macro in sheet1 will work as well in sheets2 and 3. But it's not. I just copied the code from VB codes Excel...
  5. H

    Dashboard Reporting

    I have created an excel dashboard that contains two separate traffic light charts. Each traffic light collects its data from a different cell. When only 1 traffic light is showing and the VB code is for 1 light it works. When I add the second light and code I get a "Compile Error: Ambiguous name...
  6. D

    Autoclosing an idle workbook on a locked workstation. Teething problems.

    Currently I have a dashboard style excel document used by multiple users on a network, these users require read/write priviledges and as such only one read/write access file can be opened at a time because of the network.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"...
  7. M

    Using Find Function in a Macro

    Long time viewer, first time poster. I want to build a macro to push a value from an input cell to table on another tab. For the sake of this forum, I made a very simplified version of what I want to do. On my second tab I have a table with TV shows and number of seasons: Dexter 6 True...
  8. R

    VB Code not working right (Post values to first available row)

    Hello, I have this code that is not working exactly right. I am attempting to get some values of one sheet, and post them to a table on a second sheet. On the first sheet they are copied from specific cells each time. They are being copied to a table on the 2nd sheet in which i need the values...
  9. R

    VB Code to post values from one sheet to another

    Hello i could you some help with my VB code. I am having a bit of trouble figuring out how to post values from specific cells in one sheet, say (A5, C10, D15, and E20) to a table on a second sheet on the click of a button. Values in the 2nd sheet will post to the first available row in a table...
  10. S

    VB Coding Help

    Need some help with vb coding. What I have now is If Target >= 101 Then Target = Target * 1.14 If Target <= 100 Then Target = Target * 1.25 What I really need is If Target >0 but <=100 then Target = Target * 1.25 If Target >100 but <500 then Target = Target * 1.14 If Target >=500 but then...
  11. X

    help with bug in vb code...

    Hi Everyone, Im using the following code to insert multiple data in a single cell. For example: I choose a from a drop-down list (data validation cell) and it inserts the clicked item in the same data validation cell. '------------------ Data Validation add in same cell...
  12. X

    run vb code when its time for new record

    Hello, I created a macro that inserts a copy of the last row's format to make a new record (row). I would like to some how run the macro without a shortcut key. Instead I would like to be at the last record (row) and once I start typing something on any cell in the next empty row it will...
  13. T

    Creating random subset of list then retreiving other columns

    Can't think of any other way to describe this. I Have Excel 2010 and a voter registration list in 1 sheet. A blank sheet will contain a random selection from the VR sheet. Since it only pulls the name, I am trying to write VB code to: 1. Loop through the random sheet, picking the next name...
  14. N

    VB Code - Merge 5 sheets create Run-time error 1004

    Dear VB-experts, I have 5 worksheets that are updated regularly in a folder and then brought into a new summary workbook using vb code. This works all fine. My problem is when I try to merge the 5 sheets to one summary sheet in the summary workbook using vb code. Code: Sub Step_5() Dim ws...
  15. B

    Need help with Macro Code!

    Hi I don’t really know anything about Macro or VB. I just started learning recently because I started working on this project, and it requires the use of VB. I have sheet 1 where users will input data, such as selecting from drop down list, inputting some other information, and etc. This...
  16. D

    need macro to remove auto_open when i Save

    I have a file that generates a report automatic using the Auto_Open macro and the scheduler .. at 6 am the file open and imports data from other files and generates report, then, the report is auto save as a file with at date code added. Problem ... when the file is rename it still contain the...
  17. A

    Keepintg pivot table formatting during refresh

    Hi, Have some pivot tables, linked to charts which refresh automatically upon opening. Only problem is the table's loose the color formats from the bars, and sometimes the scales are not correctly adjusted. Does anybody know the code for an event macro which will cause the graphs to be...
  18. A

    How to save and close an excel using Access VB code

    I have two procedures in two different access forms. First procedure executes fine. It ends up with creating a Table1 by importing the data successfully from the Excel file. But after that later when I call procedure 2, it throws the below error when it is trying to import the data in to Table2...
  19. K

    Conditional Formatting in Chart

    Hello, I have the following code, attempting to change the color of a data point based on a condition. If a certain value in a "named range" (used as source data for the chart) is 2 then the data point should look "green" on the graph. Sub Chrt() Charts.Add ActiveChart.ChartType =...
  20. R

    Hiding all tool bars/Menus in Excel

    Can any one please let me know how I can hide all the tool bars/ Menus in Excel, except the one I created for myself. The tool bars must remain hide untill I close this workbook.

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top