Download panduan vba macro full version

  • Toma Ovidiu says:
    September 20, 2022 at 9:40 am

    Hello can VBA code be inserted into Excel 365? if so how?

    • Hi!
      You can record and run VBA macros with all Excel desktop versions. In the online version of Excel, VBA does not work.

  • Anat says:
    July 11, 2022 at 8:59 am

    Hi,

    I'm trying to add a blank row between every row.
    After running the VBA code, I get an error 6 - overflow.

    When debugging, it looks like there's an issue with the following string:
    CountRow = rng.EntireRow.Count

    Please help me resolve this <3

  • Kel says:
    April 28, 2022 at 4:35 pm

    Hello,
    I need to use VBA in a worksheet_change event instead of formula, so you can leave the cell empty ready for user interface, or when the conditions are met the value can be put in the cell automatically and protected at the same time. I am looking to autopopulate previously entered data based on the client's unique identifier. This is my formula, which works/allows for the formula to auto-populate/return data BUT it doesn not allow for data entry if there is no match/data to return once the sheet is protected?
    =IFERROR(INDEX($C$7:C7,MATCH($A$7:$A$6001,$A$7:$A$6001,0))," ")

    • Hi!
      Unfortunately, here we can only help you with Excel formulas.

  • TARUN says:
    April 6, 2022 at 11:51 am

    Hello everyone, I would like to ask you for help with my problem. I think it's possible to solve it with VBA, but I'm not sure how to do it. there is two sheet named INVOICE and INVOICE LIST. I want transfer invoice Item Data Row wise as per Invoice No, Date and Consumer Name to INVOICE LIST Sheet as per Column Basis by clicking SAVE BUTTON Automatically. I want to create NEW INVOICE Button for Generate Invoice No Automatically.

    INVOICE Invoice #: 2
    Invoice Date 06-04-2022 Want to create Button

    CUSTOMER: ß Save Button

    ß Edit Button

    ß Cancell Button

    ß New Invoice Button
    Sr. Items Name Item DESCRIPTION QTY Unit Price Total Value
    1 ₹ -
    2 ₹ -
    3 ₹ -
    4 ₹ -
    5 ₹ -
    6 ₹ -
    7 ₹ -
    8 ₹ -
    9 ₹ -
    10 ₹ -
    11 ₹ -
    12 ₹ -

    Sub Total ₹ -

    5% Tax @ ₹ -

    Invoice Total ₹ -

    INVOICE NO DATE CONSUMER NAME ITEM1 ITEM2 ITEM3 ITEM4 ITEM5 ITEM6 ITEM7 ITEM7 ITEM8 ITEM9 ITEM10 VALUE

  • Yen says:
    February 26, 2022 at 10:01 am

    Hi, I'm looking for a solution that create a button to print excel worksheet with print range A2:AA73 from a workbook into pdf and save a copy of pdf in specific file location and file name will be based on each sheet cell value at AD2

    Can you help me with how to code that part? I'll be really appreciated your help.

  • Nazar says:
    December 15, 2021 at 10:17 am

    Hi everyone,
    can you please help me on writing VBA code in excel as per my requirement:
    Requirement:
    In Cell: D23 (containing formula value automatically generated on every 15 minutes)
    In column c23=current time value is showing
    In Cell "A30:A54" (value started from 9.30, 9.15, 10.00, 10.15, 10.30, 10.45, 12.00, 12.15, 12.30, 12.45, 13.00, 13.15, 13.30, 13.45, 14.00, 14.15, 14.30, 14.45, 15.00, 15.15, 15.30 respecitively each time value in each row)

    Now I want to copy cell D23 value and Paste value only inside the Cell Range : B30:B54 where Cell C23=matches with Cell A30:A54).

    Kindly help to write code on VBA in excel.

  • Prasanna says:
    December 8, 2021 at 12:15 pm

    Thank you very much

  • Dawka says:
    November 12, 2021 at 3:13 am

    thanks

  • Irene says:
    November 2, 2021 at 9:15 am

    Hi, I'm looking for a solution that is I created a report on excel and I also created a button to export that report excel file into a pdf and its location is on Sharepoint, not in some folder only on Computer. Can you help me with how to code that part? I'll be really appreciated your help.

  • GuyGuy5555 says:
    September 17, 2021 at 6:31 pm

    Is there a code set or technique to get an excel sheet to read all the documents in a folder, their headers (if they are word documents) and then build a hyperlink list with colums that display data fields from the header like dates/vital-info/etc.

    Is this possible?

  • M Shaw says:
    August 12, 2021 at 6:53 am

    Hi
    Is there a code or tool in Excel to enable a cell pop up a number previously entered in another cell immediately that number is deleted?

  • Lawrence says:
    July 7, 2021 at 4:12 am

    I've written a whole script which works in extracting all the information from a Questionnaire in word to excel. However, the only problem I've run into is when questions within the Questionnaire has tick box options. My current VB macro script just pulls in the box symbol, but not the words associated with the ticked box/next to the tick boxes. Is there a VB macro script you can recommend I can write which allows me to pick up the text associated with the ticked box instead?

  • Zeeshan Hyder says:
    May 26, 2021 at 7:20 am

    Hello,
    I need to learn coding in excell. Actually I want to use coding in excell for getting expenditures year wise. In excell sheet im going to fill cells with expenditures pertain to different years but i want excell to use codes and give those expenditures years wise as an easy reporting. Kindly guide me through this how could i get desired results, please.

  • Daljeet says:
    May 18, 2021 at 8:12 am

    I have 2 Dropdown List with the same options (Included and Excluded) in different sheets. If I select " Included" in one dropdown list, it should also select "Included" on another dropdown list and vice versa. I need VBA code to crack this.

  • Priyantha says:
    May 10, 2021 at 7:11 pm

    I have an excel excel workbook .It has four sheets A, B, C, D .A, sheet information .Rowes' information is categorized in C column. VBA code so that the information contained in the Rowes can be found on the B sheet, the information on the C on the C sheet and the information on the D on the D sheet. want to .

  • Priyantha says:
    May 10, 2021 at 10:13 am

    Hi
    I have 3 sheets work book. sheet1 'E,sheet 2 'N anf Sheet 3 'D'. It has 1000 rows in sheet 1. "H" column data catagary 'N' and 'D' two data type .I want to link data by N or D to other two sheets .

  • bridget says:
    May 8, 2021 at 3:26 pm

    this deleted active names as well so my entire excel has #name error now. is there a VBA that only deleted names that are not used

  • Pats says:
    April 23, 2021 at 6:34 am

    I am having an excel wherein i have done some conditional formatting with color coding and i just want to copy the color codes to another fields, can you suggest a macro VBA so that i can run it?

  • Gerald says:
    March 27, 2021 at 12:23 pm

    Hi

    May I request the expertise of those who are professionals in VBA. I'm planning to improve my procurement monitoring in excel using the VBA wherein I want to simplify the way I can search for the status of purchases. By simply typing the reference number in the search bar then the status would appear. Would that be possible in excel VBA. Thank you in advance for your help

  • Alex says:
    March 15, 2021 at 4:10 am

    how i can give command in execel

  • Alice says:
    March 10, 2021 at 5:58 pm

    Hi,

    I need a code to color the sheet tab to red if T43 in that sheet is > 0, no change to sheet color for all other cases. I'd like this to run for the entire workbook of 160 sheets automatically. Can someone help?

    Thank you.

    Alice

    • jes kainth says:
      June 21, 2022 at 12:08 pm

      i like your question as well.
      Can someone help us on this?

      • Hi!
        Unfortunately, we can't help writing a VBA macro. Only Excel formulas.

  • hussein says:
    February 28, 2021 at 10:23 am

    please can I have a cod to calculate the average for each 29 number of excel column with 184450 row

  • Los says:
    February 5, 2021 at 10:15 am

    Hello everyone, I would like to ask you for help with my problem. I think it's possible to solve it with VBA, but I'm not sure how to do it. Also, if there is a way to do it without VBA, even better.
    I exported the tasks from the Planner to Excel (did some work to filter and format the data I needed, etc.) and finally, I have a list of tasks that belong to a person. For each person, I have to manually enter the approximate time needed to complete the task, during the task that person should enter each week how many hours he spends solving the task and when the task is completed I can compare in the table the time he spends and the time I set for this assignment. This table needs to be used for a long time, and the task list changes almost every week, so I need to export new data from the scheduler every week, but save the data previously entered for some tasks. Each time an export is performed, the order of tasks in Excel changes and this is the point when a problem occurs. The time I need to specify for each task (forecast) is entered manually, for example, for the task "Task1" in A1 the forecast is entered in C1. The next time I export tasks from the Planner, it is possible that "Task 1" will no longer be in A1 (ie I added another task in the Planner and now that task is the first, so "Task 1" moves to A2), but the forecast for " Task 1 "remained in C1 (because column C is not included in exports). How to ensure that cell C1 follows the task in A1, no matter where the data from A1 is transferred? In this case, when a new export is made, the forecast from C1 should be automatically moved to C2, because the task from A1 is now to A2. I hope someone can help me. Thanks in advance, Los

  • Jagan says:
    January 16, 2021 at 2:04 pm

    I Want use VBA code flash data on return on blog

  • Arihant says:
    December 1, 2020 at 11:20 am

    Hello, thank you for your help. If possible, could you please help me with an additional problem? I have around 1000+ xml files and I want to convert them to excel or csv file. Is it possible to do that as well? If so, can you show me how?

    Thank you for your time.

  • Ash says:
    November 29, 2020 at 2:24 am

    Hey! I am looking for a little help with a code. I am a beginner it is a little confusing..

    Change the application so that now there is no limit.

    For EG, if the strategy says to buy 30% more shares but there is not enough cash on hand to do so, the investor will now borrow the cash they need. Now the cash positions in
    columns H and J of the Model worksheet can be negative, indicating that the investor
    owes money to the lender.

    Capture the maximum the investor ever owes during the year in an extra output cell, keep
    track of it, and summarize it (including a histogram), just like all of the other outputs,
    with your VBA code.

  • Rajkumar M says:
    November 14, 2020 at 7:36 am

    Hi Sir i want to count diffent names in coloum wise what is the formula or code?

  • Bala says:
    October 20, 2020 at 4:04 pm

    i am new vb in excel and need some assistance with the following macro. any help greatly appreciated. i need to create a macro which will take value from sheet 1 cell A1 value ,(example: CD-600500 is available in sheet 1 cell A1) then increment the value by 1 in sheet 2 cell range A5:A50,also A5:A50 if the cell is blank try goto next row and increment the value by 1.

  • vidhu says:
    October 3, 2020 at 5:56 am

    I need a code to convert half of my numbers to variables. example if the number is 12345, i need to convert it as ABC45. (A=1, B=2 Etc..) Someone Please help.

  • Nicolai says:
    September 15, 2020 at 6:40 am

    hi there, im quite new at programming but uses excel alot so what im looking for would help me quite alot.
    i would like to create a macro or a button that takes the value i a cell and multiplies it with negative one.
    Example:
    i have multiple sheets and plots in a number from sheet one to sheet two, then in sheet two i need the number to be multiplied with negative one, whilst still being traceble to where the value came from. is this possible?

    sorry if the explenation is bad, English is my second language.

  • Sukhbinder Singh Bhogal says:
    September 15, 2020 at 4:14 am

    Hi Friends, one of my friend did find an issue where one row data was into single cell with a separator "|" pipe sign of each rows where he was finding difficult to use filters as the file was large about 2500 rows and thus it was cumbersome to copy paste it. Thus, he asked me to help where I could do it with VBA coding. Short Program -

    Option Explicit

    Sub CellTruncateData()
    'This code is for Vishal Nagra
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    Dim CellData, TempData As String, Counter As Integer
    Dim i, j As Integer

    Counter = 0

    For i = 48 To 2541
    j = 1
    'Test.xlsm is the excel workbook and O_test is the worksheet where the data exists in one cell and C_test is the worksheet the data to be placed in different cells.

    CellData = CStr(Application.Workbooks("Test.xlsm").Worksheets("O_test").Cells(i, 1))
    'Debug.Print CellData
    For Counter = 1 To Len(CellData)
    If (Mid(CellData, Counter, 1) "|") Then
    If (Mid(CellData, Counter, 1) " ") Then
    TempData = TempData + Mid(CellData, Counter, 1)
    End If
    Else
    Application.Workbooks("Test.xlsm").Worksheets("C_test").Cells(i, j) = TempData
    j = j + 1
    TempData = ""
    End If
    Next
    ' Debug.Print TempData

    Next

    Application.ScreenUpdating = True
    Application.Calculation = xlCalculationAutomatic
    End Sub

  • Mayank says:
    June 10, 2020 at 11:36 am

    Hi sir thanks for sharing the info., my question is after saving the macro and its respective workbook if I want to run the same macro in other workbook will it work because i have tried it in the other workbook but it has not worked in other workbook or if I open the new excel sheet.

  • bibek says:
    March 3, 2020 at 8:49 am

    hi... i need a vba code for making my worksheet for attendance system where after entering the time of went and out the people cannot edit except the user coder by keeping their password system or any method..

    • Gary says:
      May 31, 2020 at 1:19 pm

      Hi Bibek,
      I can help you with that.
      What I understood you want to keep a record of employees attendance and once entered it cannot be edited without a password. correct?

  • Ezio Abbate says:
    February 10, 2020 at 12:56 pm

    Hi everyone I have a small problem with a vba to create with excel.
    I state that I can not create vba, but I was looking for information with which to be able to create it. I hope you can help me ,I would be really grateful.

    I expose the problem:

    I would like to enter a formula that:

    The moment I enter a particular name in one cell, other names that I decide, appear in other cells. It's possible to do it?

    • Gary says:
      May 31, 2020 at 1:22 pm

      @Ezio,
      yes its possible. using Vlookup. but if you can explain a bit, i will be able to help.

  • Clamhead says:
    January 16, 2020 at 8:34 pm

    The code I copied from sount and sum cells by colour does not show up in the Macros name list after I have done the steps.

  • Ubaid ullah says:
    December 27, 2019 at 10:12 am

    I want a coding that use in ms excell for spellnumber formula

    Those convert a no in to write text

  • Pradip says:
    November 27, 2019 at 4:28 am

    Sir/Madam, I am an excel user. I am facing a problem. Here is a vendor who gives services various pathological test;like TC,DC,ESR. T3,T4,TSH.LFT etc.I want to create a database file in Sheet1 and where these tests are kept. Now day by day there so many patients examine their various patho.tests. I want to create that type of database when I write the test name the machine invoke the respective test and rate and put the value againt that particular patient. How can I solve the problem? Awaiting for your positive reply.

  • Hemanth says:
    November 19, 2019 at 5:52 pm

    Can anyone please help me....... My requirement is i have an a master sheet having 5000 rows and 5 to 6 columns.... In that sheet i will give you one column data in another sheet automatically remaining column wil fill...is it possible

  • Ankit Singh says:
    November 19, 2019 at 10:33 am

    Hi,
    i have a query with regard macro.
    Function timestamp(Reference As Range)
    If Reference.Value “” Then
    timestamp = Format(Now, “dd-mmm-yy hh:mm:ss”)
    Else
    Ok = “”
    End If
    End Function

    this code show text format show date but i want date format please help me.

  • DoGGoD says:
    October 22, 2019 at 7:01 am

    Hi!
    Thank you! It saved me about a weeks worth of copy-paste with notepad in between to go through around 15000 lines. Awsome!

  • Mzamo says:
    October 17, 2019 at 8:42 am

    Hi

    How can I write a code to do the following; If content in( W3:W395) is blank then delete the content in cell (G3:G395).

    Please help.

  • Bruce Onisko says:
    September 30, 2019 at 11:29 pm

    Works perfectly! Thanks!

  • Kev says:
    September 6, 2019 at 3:30 pm

    I was wondering how I can modify the code to have all the excel files into 1 sheet instead of each individual sheets? Thank you

  • Haku says:
    September 5, 2019 at 9:12 pm

    Hello, i would like to change the address from where i am sending all the emails using the VBA macro excel. How do i change that? i dont know i am clear o not. Every time i send the emails from the VBA macro i would like to that "sender" appears a different email address than from where i am really am sending from.

  • John Sekene says:
    September 4, 2019 at 12:12 am

    I am new so hope you can help.
    I would like to write code for registration of players and teams. How do I start please?
    Thanks
    John

  • Yasir says:
    July 25, 2019 at 10:06 am

    I want to develop a VBA code; let us suppose we have values like 1 2 3 4 5 in col A1 A2 A3 A4 A5 and other values like 6 7 8 9 10 in col B1 B2 B3 B4 B4 B5 and I want to write 1/6 2/7 3/8 4/9 5/10 in columns C1 C2 C3 C4 C5.

  • Keith says:
    June 17, 2019 at 6:59 pm

    Is it possible to call excell or word, without needing to specify which version (ie word 14, word 15 etc).

  • pritam gaiwad says:
    June 1, 2019 at 5:48 am

    in vba modules are saved by which extension

  • Nathan says:
    May 25, 2019 at 5:58 am

    Hi
    I am wanting to make a Commond Button that will insert a new row below the active cell and in the new row have formulas automatically populated.
    ie say active cell is D8 the press the Button and a new row is added to Row 9 which now includes the formula =sum(D7+B6) in the new cell C9 and the formula =sum(a2-a5) in cell e9.

    Thank

  • Rawad says:
    May 22, 2019 at 12:54 pm

    Hi
    please I need assistance in converting the word into numbers

    example: let say the word (Rawad) and we have R = 10 , A = 1 , W = 700 and D = 3

    so the total of word Rawad must be 10 + 1 + 700 + 1 + 3 = 715

    thanks in advance

  • Khansab says:
    May 6, 2019 at 11:20 pm

    Sir please forward Ur good comments that how I easily access what kind of book in Pakistan for learning VBA codes.

  • Khansab says:
    May 6, 2019 at 11:17 pm

    How I made search button in excel VBA

  • helio says:
    May 1, 2019 at 5:54 pm

    Hi - I am trying to create a Button in my sheet for a randomizer formula I set up. Basically, I have a list A:A of SKU names and B:B Random(1,5000)
    I want the button to auto-generate a 10 item SKU list that can be used for Inventory Cycle Counting. I set up the button but can not get any further with the visual basic script (newbie)

  • sunil says:
    April 10, 2019 at 7:28 am

    dear sir\madam
    please tell me how to learn vba macros coding in excel sheets
    please help me

  • Ivin Chibanda says:
    April 9, 2019 at 1:51 pm

    I am failing to locate and make the Vb code

  • John shervell says:
    March 24, 2019 at 5:18 pm

    Hi I cannot figure out how to have a row of possible 100 numbers that when I enter a number in cell A1 all the numbers move up one cell and the new number appears in B1 any help would be appreciated

  • vijaykumar says:
    March 21, 2019 at 11:41 pm

    Hi,
    If i run the macro its successfully run ,while the next time i get an error . Kindly help what are the comment i need to use

  • Judith Hodges says:
    February 22, 2019 at 3:39 pm

    I performed the task but my spreadsheets did not merge what did I do wrong? All of the examples I followed but after the Alt F8 I was lost because it did not show what to do next or what I should be looking for.
    thanks

  • Saurabh Kulkarni says:
    February 18, 2019 at 7:22 am

    Is import function runs in excel 2010? previously i created a code using import function to import .bas file into many excels sheets by running this code. now this in not working for excel 2010. can anybody please help me out here?

    • Saurabh Kulkarni says:
      February 18, 2019 at 7:29 am

      Code:
      ActiveWorkBook.VBProject.VBComponents.Import ("C:\.....code.bas")

  • ExHell says:
    February 17, 2019 at 7:59 am

    I only need to remove carrigae returns in 1 column in my case Column H.

    How can I define the range to be H, and not the whole sheet?

    Thanks

  • Abrar Ahmed says:
    January 11, 2019 at 2:09 pm

    can you please tell how to copy paste from row1(sheet1) to any cell in sheet2.. and create a button for going to next row in sheet1

  • S.M.P. Karunarathna says:
    November 25, 2018 at 10:59 am

    VBA Macro for Change Case works well
    thank you very much

  • ROHIT KUMAR PARASHAR says:
    October 3, 2018 at 10:48 am

    Dear hoe to i set vba project in colum as(rohit kumar parasshar)in single colum i read in a video (by right click view code entir.excel.com

    (Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    ...................what i write heare
    End Sub)

  • Jose Eduardo says:
    September 22, 2018 at 7:45 pm

    There are many mistakes in this post

  • Carlos Twain says:
    September 22, 2018 at 7:42 pm

    Im afraid horrible text and doesnt work

  • Carlos Twain says:
    September 22, 2018 at 7:41 pm

    This does not work

  • Margarita says:
    August 15, 2018 at 2:27 pm

    I want to thank you for this code and tutorial. I don't write VB code and just need a quick solution to a problem and this resolved it. Thank you so much for your time and effort.

  • Karen says:
    August 8, 2018 at 4:07 am

    Hi I am trying to create a template workbook for some data analysis. I have worked it up but now need to delete the data and save it as a template.

    I was just wondering if you have a workbook that has a VBA code attached if it is save as a macro enabled workbook do you have to add the code again when you reopen the workbook?

    Many thanks,

    Karen

    • Doug says:
      August 8, 2018 at 11:41 am

      Karen:
      When you put the VBA in the module and saved it, the code would be in Excel. It would be available to be called from inside that workbook. Click Alt-F8 and you can see what code is available in that workbook. You should see the names of the modules you built and saved.

  • robert rowland says:
    July 10, 2018 at 9:52 pm

    Dear Sir / Madam.
    I have made a user form with 7 entries. I would like to have an Even number to become a Red font through my user form. So if the number is 346 then this number and all the other 7 boxes become a red font. Any help would be greatly appreciated. I just don't know what to write.
    Thanks and Kind regards
    Rob

  • Tafadzwa Munganasa says:
    June 26, 2018 at 3:07 pm

    Thank you. Works perfectly!!

  • Delmar says:
    May 22, 2018 at 7:10 pm

    Hi there,
    I tried your code but it doesn't do anything. No messages, nothing. What am I doing wrong?

    • Anestazia says:
      June 26, 2019 at 8:19 am

      the same here!!

      • Daniel Tunberg says:
        November 14, 2019 at 10:53 am

        Same for me

  • Lindsay says:
    May 11, 2018 at 8:51 pm

    I just want to say thank you for this fantastic, simple solution and for your awesome products in general.

  • PAVAN says:
    May 6, 2018 at 4:57 pm

    Hello,

    I want a code which is used to cut the rows having the red color and paste in another sheet and when color changes to white should transfer to same sheet (online spread sheets)

  • MADHUSUDHANRAO says:
    May 5, 2018 at 12:07 pm

    IT IS VERY NICE THANK YOU

  • imtiaz ahmad says:
    April 27, 2018 at 1:42 pm

    Hellow Team,

    we need your help for VBA Coding in excel i don't know VBA coding how to start
    learning VBA Coding.

    • Ishwaryapriya says:
      April 28, 2020 at 5:20 pm

      Please help me to reference link to enhance skills I vBa

  • cindy says:
    April 12, 2018 at 3:45 am

    Hello,

    Anyone who can assist me to provide a vba code on how to generate a responses that will be consolidated to another worsheet. Example, Response with "Will be included in the remediation" and "Partial Remediation" will be generated to the consolidated worksheet. Thanks

  • Javier says:
    April 11, 2018 at 2:04 pm

    Hi All,

    I would appreciate if someone could help me with some VBA coding I need to do. I am creating a userform for an excel document. It is quite simple but I really dont know how VBA coding works. I have 6 categories in my spreadsheet that have got to filled up in the form with numbers from 1/10 and then there is a comments box to for extra comments and a name box for the user name. finally it has 2 command boxes: Add company and close form.
    I have done the form now and given the usual names to the boxes such as:
    txtname
    cboquality
    cboprice
    cbostock
    cmdAdd
    cmdClose
    Can someone help me out with the code so that once the form is filled and the command box for add clicked all the information goes to the spreadsheet?

    It would be greatly appreciated

  • PeterF says:
    January 27, 2018 at 3:10 pm

    Thank You! Big help!

  • Yana Nina says:
    January 25, 2018 at 10:51 pm

    Hi!
    If i can't save file after i add this VBA code. It says that there is an error and Excel may able to save file by removing or repairing some features. Options are to click continue or cancel. When clicking continue it want to save file as another one, but in the end it says :file was not saved".

  • Sophie says:
    December 31, 2017 at 2:28 pm

    Thank you so much. Big help.

  • Nurul Islam Chowdhury says:
    December 28, 2017 at 5:14 am

    Excellent guideline. Thanks.

  • Sohaib says:
    December 15, 2017 at 4:52 pm

    Hi this is Sohaib. I have learned the VBA for converting numbers into words but I also want to add the word "only" after converting the numbers into words. Please help if you can.

    • dada says:
      November 8, 2019 at 5:43 am

      Function SpellCurr(ByVal MyNumber, _
      Optional MyCurrency As String = "Rupee", _
      Optional MyCurrencyPlace As String = "P", _
      Optional MyCurrencyDecimals As String = "Paisa", _
      Optional MyCurrencyDecimalsPlace As String = "S")

      '*****************************************************************************************************************
      '* Based on SpellNumbers UDF by Microsoft, Which handles only Dollars as currency *
      '* UDF modfied by Yogesh Gupta, , Ygblogs.blogspot.com on July 21, 2009 *
      '* UDF modified on September 04, 2009 to make currency inputs optional, by default it will use Indian Currency *
      '* This modified UDF can be used for any currency in case you provide for currency inputs *
      '* User can define the Prefix and Sufix place for Currency and CurrencyDecimals *
      '* MyNumber = Numeric Value you need to convert into words *
      '* MyCurrency = Name of your Currency - i.e. Dollar for USA *
      '* MyCurrencyPlace = Prefix or Suffix the currency, use "P" for Prefix and "S" for Suffix *
      '* MyCurrencyDecimals = Name of your Currency Decimals - i.e. Cent for USA *
      '* MyCurrencyDecimalsPlace = Prefix or Suffix the currency decimals, use "P" for Prefix and "S" for Suffix *
      '*****************************************************************************************************************

      Dim Rupees, Paisa, Temp
      Dim DecimalPlace, Count

      ReDim Place(9) As String
      Place(2) = " Thousand "
      Place(3) = " Million "
      Place(4) = " Billion "
      Place(5) = " Trillion "

      'String representation of amount.
      MyNumber = Trim(Str(MyNumber))

      'Position of decimal place 0 if none.
      DecimalPlace = InStr(MyNumber, ".")

      ' Convert Paisa and set MyNumber to Rupee amount.
      If DecimalPlace > 0 Then
      Paisa = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
      "00", 2))
      MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
      End If

      Count = 1

      Do While MyNumber ""
      Temp = GetHundreds(Right(MyNumber, 3))
      If Temp "" Then Rupees = Temp & Place(Count) & Rupees
      If Len(MyNumber) > 3 Then
      MyNumber = Left(MyNumber, Len(MyNumber) - 3)
      Else
      MyNumber = ""
      End If
      Count = Count + 1

      Loop

      If MyCurrencyPlace = "P" Then
      Select Case Rupees
      Case ""
      Rupees = MyCurrency & "s" & " Zero"
      Case "One"
      Rupees = MyCurrency & " One"
      Case Else
      Rupees = MyCurrency & "s " & Rupees
      End Select
      Else
      Select Case Rupees
      Case ""
      Rupees = "Zero " & MyCurrency & "s"
      Case "One"
      Rupees = "One " & MyCurrency
      Case Else
      Rupees = Rupees & " " & MyCurrency & "s"
      End Select
      End If

      If MyCurrencyDecimalsPlace = "S" Then
      Select Case Paisa
      Case ""
      Paisa = " Only"
      Case "One"
      Paisa = " and One " & MyCurrencyDecimals & " Only"
      Case Else
      Paisa = " and " & Paisa & " " & MyCurrencyDecimals & "s Only"
      End Select
      Else
      Select Case Paisa
      Case ""
      Paisa = " Only"
      Case "One"
      Paisa = " and " & MyCurrencyDecimals & " One " & " Only"
      Case Else
      Paisa = " and " & MyCurrencyDecimals & "s " & Paisa & " Only"
      End Select
      End If

      SpellCurr = Rupees & Paisa

      End Function

      '*******************************************
      ' Converts a number from 100-999 into text *
      '*******************************************

      Function GetHundreds(ByVal MyNumber)
      Dim Result As String
      If Val(MyNumber) = 0 Then Exit Function
      MyNumber = Right("000" & MyNumber, 3)
      ' Convert the hundreds place.
      If Mid(MyNumber, 1, 1) "0" Then
      Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
      End If

      ' Convert the tens and ones place.
      If Mid(MyNumber, 2, 1) "0" Then
      Result = Result & GetTens(Mid(MyNumber, 2))
      Else
      Result = Result & GetDigit(Mid(MyNumber, 3))
      End If
      GetHundreds = Result
      End Function

      '*********************************************
      ' Converts a number from 10 to 99 into text. *
      '*********************************************
      Function GetTens(TensText)

      Dim Result As String
      Result = "" ' Null out the temporary function value.
      If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
      Select Case Val(TensText)
      Case 10: Result = "Ten"
      Case 11: Result = "Eleven"
      Case 12: Result = "Twelve"
      Case 13: Result = "Thirteen"
      Case 14: Result = "Fourteen"
      Case 15: Result = "Fifteen"
      Case 16: Result = "Sixteen"
      Case 17: Result = "Seventeen"
      Case 18: Result = "Eighteen"
      Case 19: Result = "Nineteen"
      Case Else
      End Select
      Else ' If value between 20-99...
      Select Case Val(Left(TensText, 1))
      Case 2: Result = "Twenty "
      Case 3: Result = "Thirty "
      Case 4: Result = "Forty "
      Case 5: Result = "Fifty "
      Case 6: Result = "Sixty "
      Case 7: Result = "Seventy "
      Case 8: Result = "Eighty "
      Case 9: Result = "Ninety "
      Case Else
      End Select

      Result = Result & GetDigit _
      (Right(TensText, 1)) ' Retrieve ones place.
      End If
      GetTens = Result
      End Function

      '*******************************************
      ' Converts a number from 1 to 9 into text. *
      '*******************************************

      Function GetDigit(Digit)
      Select Case Val(Digit)
      Case 1: GetDigit = "One"
      Case 2: GetDigit = "Two"
      Case 3: GetDigit = "Three"
      Case 4: GetDigit = "Four"
      Case 5: GetDigit = "Five"
      Case 6: GetDigit = "Six"
      Case 7: GetDigit = "Seven"
      Case 8: GetDigit = "Eight"
      Case 9: GetDigit = "Nine"
      Case Else: GetDigit = ""
      End Select
      End Function

  • Fernanda says:
    December 14, 2017 at 12:17 am

    Hi, I added a VBA code for a new Formula (CONCATENATEIFS) and it works greate but the only problem is that its super slow, I tried to use your speed up tip but it ended up slower (probably because I dont know where exactly to put it because the formula doesn´t have a Sub line) Can you help me?
    The formula is this one: Function ConcatenateIfs(ConcatenateRange As Range, ParamArray Criteria() As Variant) As Variant
    ' Source: EileensLounge.com, August 2014
    Dim i As Long
    Dim c As Long
    Dim n As Long
    Dim f As Boolean
    Dim Separator As String
    Dim strResult As String
    On Error GoTo ErrHandler
    n = UBound(Criteria)
    If n < 3 Then
    ' Too few arguments
    GoTo ErrHandler
    End If
    If n Mod 3 = 0 Then
    ' Separator specified explicitly
    Separator = Criteria(n)
    Else
    ' Use default separator
    Separator = ","
    End If
    ' Loop through the cells of the concatenate range
    For i = 1 To ConcatenateRange.Count
    ' Start by assuming that we have a match
    f = True
    ' Loop through the conditions
    For c = 0 To n - 1 Step 3
    ' Does cell in criteria range match the condition?
    Select Case Criteria(c + 1)
    Case " Criteria(c + 2) Then
    f = False
    Exit For
    End If
    Case "= Criteria(c + 2) Then
    f = False
    Exit For
    End If
    Case ">="
    If Criteria(c).Cells(i).Value "
    If Criteria(c).Cells(i).Value <= Criteria(c + 2) Then
    f = False
    Exit For
    End If
    Case ""
    If Criteria(c).Cells(i).Value = Criteria(c + 2) Then
    f = False
    Exit For
    End If
    Case Else
    If Criteria(c).Cells(i).Value Criteria(c + 2) Then
    f = False
    Exit For
    End If
    End Select
    Next c
    ' Were all criteria satisfied?
    If f Then
    ' If so, add separator and value to result
    strResult = strResult & Separator & ConcatenateRange.Cells(i).Value
    End If
    Next i
    If strResult "" Then
    ' Remove first separator
    strResult = Mid(strResult, Len(Separator) + 1)
    End If
    ConcatenateIfs = strResult
    Exit Function
    ErrHandler:
    ConcatenateIfs = CVErr(xlErrValue)
    End Function

    Thank you very much!!

    • Peggy Wong says:
      October 21, 2019 at 6:09 am

      Hi, may I have the excel vba code and what is the meaning. so that I can more understanding. try to how to use.

      thankyou

    • Abubakar Sadiq says:
      April 8, 2020 at 5:41 pm

      Hi, I want to use an override command to replace some values when I change one of them, which VBA can I use?