RE: $$Excel-Macros$$ Identifying Excel number format
Dear Xltime, The macro is working fine but the loop it is not going down to the last used cell it is working only up to 1st blank cell can you please change the code so as to make it run up to last used cell. Thanks in advance. Thank you Regards Sandeep Kumar Chhajer. From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of xlstime Sent: 05 October 2013 16:59 To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Identifying Excel number format c an you please example your requirement please find attachment hope it fulfill your requirement . Enjoy Team XLS On Sat, Oct 5, 2013 at 3:14 PM, Sandeep Chhajer chhajersand...@gmail.com mailto:chhajersand...@gmail.com wrote: PFA the original file. Hope it will work. On 5 October 2013 13:00, ashish koul koul.ash...@gmail.com mailto:koul.ash...@gmail.com wrote: i can't see custom format On Sat, Oct 5, 2013 at 12:59 PM, Sandeep Kumar Chhajer chhajersand...@gmail.com mailto:chhajersand...@gmail.com wrote: Dear Ashish, This is only original file, I have just cut down the number of entries to certain extent as I am checking my code with lesser data. Sent on my BlackBerryR from Vodafone _ From: ashish koul koul.ash...@gmail.com mailto:koul.ash...@gmail.com Sender: excel-macros@googlegroups.com mailto:excel-macros@googlegroups.com Date: Sat, 5 Oct 2013 12:55:31 +0530 To: excel-macrosexcel-macros@googlegroups.com mailto:excel-macros@googlegroups.com ReplyTo: excel-macros@googlegroups.com mailto:excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Identifying Excel number format can u share the orginal file On Sat, Oct 5, 2013 at 12:53 PM, Sandeep Chhajer chhajersand...@gmail.com mailto:chhajersand...@gmail.com wrote: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00 Aditya Enterprises 99521.00 101086.00 1565.00 Cr Airways Corporation 39363.80 Dr 39363.80 Dr Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 186938.45 Dr AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 92280.25 Cr Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 11536.48 Cr Now, the custom number format for negative number is 0.00 Cr and for positive number is 0.00 Dr. (I have also attached herewith the file for your reference.) Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' i want this b shall change value according to the new destination i.e. ' _want to make it as variable according to the new cell format. b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com mailto:excel-macros%2bunsubscr...@googlegroups.com . To post to this group, send email to excel-macros@googlegroups.com mailto:excel-macros@googlegroups.com . Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Regards Ashish Koul Visit http://www.excelvbamacros.com/ My Excel Blog Like Us on Facebook http://www.facebook.com/pages/Excel-VBA-Codes
Re: $$Excel-Macros$$ Identifying Excel number format
Dear De Premor, Sorry for the late reply. Your code is running perfectly. Thanks for the code. On 5 October 2013 18:22, De Premor d...@premor.net wrote: try this Sub xcv() Dim Data As Range, Rng As Range Set Data = Range(A6) Set Data = Range(Data, Data.End(xlDown)).Offset(, 4) For Each Rng In Data Rng.Offset(, 2) = Rng * IIf(InStr(1, Rng.NumberFormat, Cr) 0, -1, 1) Next End Sub Pada 05/10/2013 14:23, Sandeep Chhajer menulis: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00Aditya Enterprises 99521.00 101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may
$$Excel-Macros$$ Identifying Excel number format
Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00Aditya Enterprises 99521.00 101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. dr cr.xlsb Description: Binary data
Re: $$Excel-Macros$$ Identifying Excel number format
can u share the orginal file On Sat, Oct 5, 2013 at 12:53 PM, Sandeep Chhajer chhajersand...@gmail.comwrote: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00Aditya Enterprises 99521.00 101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- *Regards* * * *Ashish Koul* *Visit* *My Excel Blog http://www.excelvbamacros.com/* Like Us on Facebookhttp://www.facebook.com/pages/Excel-VBA-Codes-Macros/15180389897 Join Us on Facebook http://www.facebook.com/groups/163491717053198/ P Before printing, think about the environment. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out.
Re: $$Excel-Macros$$ Identifying Excel number format
Dear Ashish, This is only original file, I have just cut down the number of entries to certain extent as I am checking my code with lesser data. Sent on my BlackBerry® from Vodafone -Original Message- From: ashish koul koul.ash...@gmail.com Sender: excel-macros@googlegroups.com Date: Sat, 5 Oct 2013 12:55:31 To: excel-macrosexcel-macros@googlegroups.com Reply-To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Identifying Excel number format can u share the orginal file On Sat, Oct 5, 2013 at 12:53 PM, Sandeep Chhajer chhajersand...@gmail.comwrote: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00Aditya Enterprises 99521.00 101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- *Regards* * * *Ashish Koul* *Visit* *My Excel Blog http://www.excelvbamacros.com/* Like Us on Facebookhttp://www.facebook.com/pages/Excel-VBA-Codes-Macros/15180389897 Join Us on Facebook http://www.facebook.com/groups/163491717053198/ P Before printing, think about the environment. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT
Re: $$Excel-Macros$$ Identifying Excel number format
i can't see custom format On Sat, Oct 5, 2013 at 12:59 PM, Sandeep Kumar Chhajer chhajersand...@gmail.com wrote: ** Dear Ashish, This is only original file, I have just cut down the number of entries to certain extent as I am checking my code with lesser data. Sent on my BlackBerry® from Vodafone -- *From: * ashish koul koul.ash...@gmail.com *Sender: * excel-macros@googlegroups.com *Date: *Sat, 5 Oct 2013 12:55:31 +0530 *To: *excel-macrosexcel-macros@googlegroups.com *ReplyTo: * excel-macros@googlegroups.com *Subject: *Re: $$Excel-Macros$$ Identifying Excel number format can u share the orginal file On Sat, Oct 5, 2013 at 12:53 PM, Sandeep Chhajer chhajersand...@gmail.com wrote: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00Aditya Enterprises 99521.00 101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- *Regards* * * *Ashish Koul* *Visit* *My Excel Blog http://www.excelvbamacros.com/* Like Us on Facebookhttp://www.facebook.com/pages/Excel-VBA-Codes-Macros/15180389897 Join Us on Facebook http://www.facebook.com/groups/163491717053198/ P Before printing, think about the environment. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com
Re: $$Excel-Macros$$ Identifying Excel number format
PFA the original file. Hope it will work. On 5 October 2013 13:00, ashish koul koul.ash...@gmail.com wrote: i can't see custom format On Sat, Oct 5, 2013 at 12:59 PM, Sandeep Kumar Chhajer chhajersand...@gmail.com wrote: ** Dear Ashish, This is only original file, I have just cut down the number of entries to certain extent as I am checking my code with lesser data. Sent on my BlackBerry® from Vodafone -- *From: * ashish koul koul.ash...@gmail.com *Sender: * excel-macros@googlegroups.com *Date: *Sat, 5 Oct 2013 12:55:31 +0530 *To: *excel-macrosexcel-macros@googlegroups.com *ReplyTo: * excel-macros@googlegroups.com *Subject: *Re: $$Excel-Macros$$ Identifying Excel number format can u share the orginal file On Sat, Oct 5, 2013 at 12:53 PM, Sandeep Chhajer chhajersand...@gmail.com wrote: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00Aditya Enterprises 99521.00 101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- *Regards* * * *Ashish Koul* *Visit* *My Excel Blog http://www.excelvbamacros.com/* Like Us on Facebookhttp://www.facebook.com/pages/Excel-VBA-Codes-Macros/15180389897 Join Us on Facebook http://www.facebook.com/groups/163491717053198/ P Before printing, think about the environment. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email
Re: $$Excel-Macros$$ Identifying Excel number format
Excel gurus, Any solution. Sandeep. Sent on my BlackBerry® from Vodafone -Original Message- From: Sandeep Chhajer chhajersand...@gmail.com Date: Sat, 5 Oct 2013 15:14:11 To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Identifying Excel number format PFA the original file. Hope it will work. On 5 October 2013 13:00, ashish koul koul.ash...@gmail.com wrote: i can't see custom format On Sat, Oct 5, 2013 at 12:59 PM, Sandeep Kumar Chhajer chhajersand...@gmail.com wrote: ** Dear Ashish, This is only original file, I have just cut down the number of entries to certain extent as I am checking my code with lesser data. Sent on my BlackBerry® from Vodafone -- *From: * ashish koul koul.ash...@gmail.com *Sender: * excel-macros@googlegroups.com *Date: *Sat, 5 Oct 2013 12:55:31 +0530 *To: *excel-macrosexcel-macros@googlegroups.com *ReplyTo: * excel-macros@googlegroups.com *Subject: *Re: $$Excel-Macros$$ Identifying Excel number format can u share the orginal file On Sat, Oct 5, 2013 at 12:53 PM, Sandeep Chhajer chhajersand...@gmail.com wrote: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00Aditya Enterprises 99521.00 101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- *Regards* * * *Ashish Koul* *Visit* *My Excel Blog http://www.excelvbamacros.com/* Like Us on Facebookhttp://www.facebook.com/pages/Excel-VBA-Codes-Macros/15180389897 Join Us on Facebook http://www.facebook.com/groups/163491717053198/ P Before printing, think about the environment. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post
Re: $$Excel-Macros$$ Identifying Excel number format
c an you please example your requirement please find attachment hope it fulfill your requirement . Enjoy Team XLS On Sat, Oct 5, 2013 at 3:14 PM, Sandeep Chhajer chhajersand...@gmail.comwrote: PFA the original file. Hope it will work. On 5 October 2013 13:00, ashish koul koul.ash...@gmail.com wrote: i can't see custom format On Sat, Oct 5, 2013 at 12:59 PM, Sandeep Kumar Chhajer chhajersand...@gmail.com wrote: ** Dear Ashish, This is only original file, I have just cut down the number of entries to certain extent as I am checking my code with lesser data. Sent on my BlackBerry® from Vodafone -- *From: * ashish koul koul.ash...@gmail.com *Sender: * excel-macros@googlegroups.com *Date: *Sat, 5 Oct 2013 12:55:31 +0530 *To: *excel-macrosexcel-macros@googlegroups.com *ReplyTo: * excel-macros@googlegroups.com *Subject: *Re: $$Excel-Macros$$ Identifying Excel number format can u share the orginal file On Sat, Oct 5, 2013 at 12:53 PM, Sandeep Chhajer chhajersand...@gmail.com wrote: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00Aditya Enterprises 99521.00 101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- *Regards* * * *Ashish Koul* *Visit* *My Excel Blog http://www.excelvbamacros.com/* Like Us on Facebookhttp://www.facebook.com/pages/Excel-VBA-Codes-Macros/15180389897 Join Us on Facebook http://www.facebook.com/groups/163491717053198/ P Before printing, think about the environment. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members
Re: $$Excel-Macros$$ Identifying Excel number format
try this Sub xcv() Dim Data As Range, Rng As Range Set Data = Range(A6) Set Data = Range(Data, Data.End(xlDown)).Offset(, 4) For Each Rng In Data Rng.Offset(, 2) = Rng * IIf(InStr(1, Rng.NumberFormat, Cr) 0, -1, 1) Next End Sub Pada 05/10/2013 14:23, Sandeep Chhajer menulis: Dear Excel Gurus, I have facing a peculiar problem related to number format. When I export any ledger from tally I got result as bellow Aditya Birla Memorial Hospital 3049.00 3049.00 Aditya Enterprises 99521.00101086.00 *1565.00 Cr* Airways Corporation 39363.80 Dr *39363.80 Dr* Airways Surgical Pvt Ltd 361446.45 Dr 959168.00 1133676.00 *186938.45 Dr* AL-SAMIYAH GROUP FOR MARKETING INT. TRADE 791326.00 883606.25 *92280.25 Cr* Al-Wafigroup for Marketing Int'l Trade Co. 743036.00 754572.48 *11536.48 Cr* Now, the custom number format for negative number is *0.00 Cr* and for positive number is *0.00 Dr. (I have also attached herewith the file for your reference.)* * * Again, I have tried to build a macro with my limited VBA knowledge but it is not working as variable b is not changing according to the current cursor location. I am pasting what i have tried. Sub format() a = Range(e15).NumberFormat ' *i want this b shall change value according to the new destination i.e.* *' _want to make it as variable according to the new cell format.* b = ActiveCell.NumberFormat Do ActiveCell.Offset(1, 0).Select If a = b Then ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * -1 ActiveCell.Offset(0, -1).Select Else ActiveCell.Offset(0, 1).Select ActiveCell.Formula = ActiveCell.Offset(0, -1) * 1 ActiveCell.Offset(0, -1).Select End If Loop Until ActiveCell.Offset(0, -4).Value = End Sub * * Please Help me out. Thanks in advance. -- Regards, Sandeep Kumar Chhajer. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out.