Home

How to get Float type from general type in VBA

%3CLINGO-SUB%20id%3D%22lingo-sub-904623%22%20slang%3D%22en-US%22%3EHow%20to%20get%20Float%20type%20from%20general%20type%20in%20VBA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-904623%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20extract%20amount%20value%20in%20my%20worksheet.%20So%20every%20number%20after%20%24%20is%20to%20be%20shown%20in%20output%20and%20their%20is%20an%20edge%20case%20whenever%20the%20number%20is%20less%20then%201%20it%20should%20be%20shown%20in%20output%20.%20I%20have%20created%20a%20dollarperc%20function%20in%20VBA%20to%20get%20the%20output.%20It's%20working%20whenever%20i%20encounter%20a%20%24%20value%20but%20it%20shows%200%20for%20decimal%20entries.%26nbsp%3B%20PFA%20my%20macro%20enabled%20workbook.%20Please%20help%2C%20i'm%20badly%20stuck%20here.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-904623%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
vicasso
Occasional Contributor

Hi,

 

I want to extract amount value in my worksheet. So every number after $ is to be shown in output and their is an edge case whenever the number is less then 1 it should be shown in output . I have created a dollarperc function in VBA to get the output. It's working whenever i encounter a $ value but it shows 0 for decimal entries.  PFA my macro enabled workbook. Please help, i'm badly stuck here. 

 

Related Conversations