# Excel-VBA Solutions

Want to become an expert in VBA? So this is the right place for you. This blog mainly focus on teaching how to apply Visual Basic for Microsoft Excel. So improve the functionality of your excel workbooks with the aid of this blog. Also ask any questions you have regarding MS Excel and applying VBA. We are happy to assist you.

## Pages

### VBA Fix Function

Today I'm going to explain you another very useful VBA function. It is Fix function. You can use this function to get the integer part of a numerical value. For an example, if you parse value 102.5 to the Fix function it will return 102

Here below is a sample subroutine from which you can get a clear idea about how this function works.

 Sub FixFunctionExample() Dim SampleValues(4) As Double SampleValues(0) = 0.25 SampleValues(1) = 5.78 SampleValues(2) = 100.5 SampleValues(3) = -25.8 SampleValues(4) = -30.2 For i = LBound(SampleValues) To UBound(SampleValues) Debug.Print Fix(SampleValues(i)) Next i End Sub

If you run the above code, you will get following result in the intermediate window.

0
5
100
-25
-30

Name

Email *

Message *
{"ft_lang_label":"__label__en","ft_lang_prob":0.6736397,"math_prob":0.9234863,"size":713,"snap":"2021-31-2021-39","text_gpt3_token_len":204,"char_repetition_ratio":0.19605078,"word_repetition_ratio":0.0,"special_character_ratio":0.28330997,"punctuation_ratio":0.09859155,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98355097,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-26T07:15:20Z\",\"WARC-Record-ID\":\"<urn:uuid:10e07530-e5dd-4dd3-a82b-37eeefe3396c>\",\"Content-Length\":\"69624\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f774a9bc-4dee-43ce-92a2-7bade7bfbaed>\",\"WARC-Concurrent-To\":\"<urn:uuid:bde5560b-5504-4f71-8a81-22a61ef75a7c>\",\"WARC-IP-Address\":\"172.217.0.51\",\"WARC-Target-URI\":\"https://www.excelvbasolutions.com/2019/12/vba-fix-function_12.html\",\"WARC-Payload-Digest\":\"sha1:4ILJF7TLC43XJFNSVTVIVI5UITHQ64LK\",\"WARC-Block-Digest\":\"sha1:LCALTQYZAPAD4PZZN3SUCGLNDC5WVGGN\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057830.70_warc_CC-MAIN-20210926053229-20210926083229-00541.warc.gz\"}"}