$$Excel-Macros$$ Prompt / Ask the value & then calculate value-- 3 rd reminder
I have send this query on 21 st -- No body reply. Is this possible or not -- Forwarded message -- From: big smileDate: 21 January 2016 at 08:12 Subject: $$Excel-Macros$$ Polite Reminer -- Prompt / Ask the value & then calculate value To: excel-macros@googlegroups.com Hello Friends Any solution for my query . Is this possible ?? Then please take some time to resolve my query. Thanks & have a nice day ... Respected Friends Information --- >> This is sample file for the premium calcualtion as per Age & sum Insured If any body age is more then 70 then I have to write in Cell -- G26 For example age is 72 I have written in G26 -- Age 72 But the premium calculates only if I mention E26 as 70 Otherwise the premium comes false Query --- >> 1] If I write anything in G26 -- above 71 then automatically in E26 -- 70 comes 2] If I write nothing in G26 -- then it should allow any value in E26 3] I should prompt or ask -- in I26 ---no claim discount coulmn it should ask to put the value in I26 -- any value -- then it allow to caluculate the exact premium This is to do because if I not prompt then I will give discount to all as per last record But discount is based on some criteria -- Claim -- Age & Sum Insured Thank you -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- Are you =EXP(E:RT) or
Re: Fw: $$Excel-Macros$$ Merge multiple Workbook
Hi Sandeep, I have a code, which simply goes to specific folder & open the workbooks one by one & copy the data and paste them in same sheet (Where the marcro is written). ** Make sure all the files have same header, because it copies all the data including the header. So if this is relevant, I can share the code. Thanks. Devendra On Tue, Jan 26, 2016 at 8:52 PM, Sandeep Chhajerwrote: > Hi, > > > Any way to solve this problem. > > Sent from my BlackBerry 10 smartphone. > *From: *Sandeep Chhajer > *Sent: *Sunday 24 January 2016 18:07 > *To: *Excel Macros > *Reply To: *excel-macros@googlegroups.com > *Subject: *$$Excel-Macros$$ Merge multiple Workbook > > Hi Excel guru, > > I have found macros for merging multiple workbook (kept in a single > folder) into a single worksheet. > > But my requirement is a step ahead...can that macro to be changed to copy > only specified column from every wrokbook (Sheet1). Like it will search in > all the workbooks (sheet1 row no 1 to 6 ) kept in a folder; and wherever it > will find "Name" , "Emp code" or " Net payment" then copy the range into > new sheet one after one. > > the code I am using (got from website) for merging the workbooks are > pasted below. (Any thing new to solve the above problem is also welcome) > > > Sub simpleXlsMerger() > Dim bookList As Workbook > Dim mergeObj As Object, dirObj As Object, filesObj As Object, everyObj As > Object > Application.ScreenUpdating = False > Set mergeObj = CreateObject("Scripting.FileSystemObject") > > 'change folder path of excel files here > Set dirObj = mergeObj.Getfolder("C:\Working\MT\MT 2015 16\MT Q3\Actuas All > ") > Set filesObj = dirObj.Files > For Each everyObj In filesObj > Set bookList = Workbooks.Open(everyObj) > > 'change "A2" with cell reference of start point for every files here > 'for example "B3:IV" to merge all files start from columns B and rows 3 > 'If you're files using more than IV column, change it to the latest column > 'Also change "A" column on "A65536" to the same column as start point > Range("A2:IV" & Range("A65536").End(xlUp).Row).Copy > ThisWorkbook.Worksheets(1).Activate > > 'Do not change the following column. It's not the same column as above > Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial > Application.CutCopyMode = False > bookList.Close > Next > End Sub > > Thanking you in advance. > -- > Regards, > CA 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 https://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > > -- > 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 https://groups.google.com/group/excel-macros. > For more options, visit
Re: $$Excel-Macros$$ database copy paste issue from one workbook to another workbook
I updated the macro to this.give it a try: Option ExplicitSub test() Dim varSheetA As Variant Dim varSheetB As Variant Dim strRangeToCheck As String Dim strRangeToC As String Dim iRow As Long Dim iCol As Long Dim wbkA As Workbook Dim eRow As Long Set wbkA = Workbooks.Open(Filename:="C:\temp\vba\fortest.xlsx")strRangeToCheck = "A:C" strRangeToC = "C:E" 'Debug.Print Now varSheetA = wbkA.Worksheets("Sheet1").Range(strRangeToCheck) varSheetB = ThisWorkbook.Worksheets("Sheet1").Range(strRangeToC) 'Debug.Print Now'Warning: VarSheetA and VarSheetB result in arrays of the ENTIRE respective workbook ' using LBound() to UBound() causes the ENTIRE workbook to be processed, ' regardless of how much is actually used. ' I'd suggest using something like: ' thisworkbook.select ' MaxRow = ActiveCell.SpecialCells(xlLastCell).Row ' MaxCol = ActiveCell.SpecialCells(xlLastCell).Column ' For iRow = 1 to MaxRow ' For iCol = 1 to MaxCol '-- For iRow = LBound(varSheetA, 1) To UBound(varSheetA, 1) For iCol = LBound(varSheetA, 2) To UBound(varSheetA, 2) If varSheetA(iRow, iCol) = varSheetB(iRow, iCol) Then ' Cells are identical. ' Do nothing. Else eRow = ThisWorkbook.Worksheets("Sheet1").Cells(Rows.Count, 3).End(xlUp).Row + 1 ThisWorkbook.Sheets("Sheet1").Range("C" & eRow & ":E" & eRow).Value = wbkA.Sheets("Sheet1").Range("A" & iRow & ":C" & iRow).Value Exit For End If Next Next wbkA.Close savechanges:=False End Sub Paul- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley - On Monday, January 25, 2016 8:14 PM, Katwrote: Hi Paul, Please see attached the fortest.xlsx file for your attention. Cheers On Tuesday, 26 January 2016 04:18:22 UTC+8, Paul Schreiner wrote: you've only sent the "Tested.xlsm" fileCan you please include the fortest.xlsx file?Otherwise, I would need to GUESS what file looks like.It LOOKS like you're comparing columns A-C in one workbook to range C-E in another. However:you have: Set varSheetA = wbkA.Worksheets("Sheet1")Set varSheetB = ThisWorkbook.Worksheets(" Sheet1") followed by:varSheetA = Worksheets("Sheet1").Range( strRangeToCheck) varSheetB = Worksheets("Sheet1").Range( strRangeToC) which will cause varSheetA and varSheetB to be defined for the currently active workbook. If you can send me a sample data file, I'd be glad to put something together for you. Paul-- --- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley -- --- On Sunday, January 24, 2016 8:32 PM, Kat wrote: Hi guys, I want to copy paste database from one Workbook A to Workbook B. When new row data is added in Workbook A, the excel vba code will compare whether the data is exist in Workbook B. If no, new row data needs to be copied and pasted automatically to last existing row in Workbook B. I've had issue with my code. Can anyone help me have a look? Thanks in advance. -- 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...@ googlegroups.com. To post to this group, send email to excel-...@googlegroups.com. Visit this group at https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- 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
Re: $$Excel-Macros$$ Prompt / Ask the value & then calculate value-- 3 rd reminder
To do what you're actually asking would take a great deal of programming. In Cell E26, a simple formula like:=IF(G26>70,70,G26) would look at G26, and if it is more than 70, it returns 70.Otherwise, it returns the actual value of G26. However, you said you want accept ANY VALUE if it's <= 70.That means that you want to be able to enter directly into E26, which would remove the formula. You COULD use Conditional Formatting to limit the value to 70.That way, if someone entered something more than 70, then it would display an error. If you REALLY want to enter text in E26 and have Excel check G26, you're going to have to write a Change Event macro that runs whenever cell E26 is changed. For item #3, what do you want to trigger the prompt for entering the discount?When you save the document?when you enter the age?when you open the document? either way, you're looking at a VBA event macro. Paul- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley - On Tuesday, January 26, 2016 4:12 AM, big smilewrote: I have send this query on 21 st -- No body reply. Is this possible or not -- Forwarded message -- From: big smile Date: 21 January 2016 at 08:12 Subject: $$Excel-Macros$$ Polite Reminer -- Prompt / Ask the value & then calculate value To: excel-macros@googlegroups.com Hello Friends Any solution for my query . Is this possible ?? Then please take some time to resolve my query. Thanks & have a nice day ... | | Respected Friends | | | | | | | | | | | | | | | | | | | Information --- >> | | | | | | | | | | | | | | | | | | | This is sample file for the premium calcualtion as per Age & sum Insured | | | | | | | | | | | | | | If any body age is more then 70 then I have to write in Cell -- G26 | | | | | For example age is 72 | | | | | | | | | | | | | | | | | | | I have written in G26 -- Age 72 | | | | | | | | But the premium calculates only if I mention E26 as 70 | | | | | | Otherwise the premium comes false | | | | | | | | | | | | | | | | | Query --- >> | | | | | | | | | | | | | | | | | | 1] | If I write anything in G26 -- above 71 then automatically in E26 -- 70 comes | | | | | | | | | | | | | 2] | If I write nothing in G26 -- then it should allow any value in E26 | | | | | | | | | | | | | | 3] | I should prompt or ask -- in I26 ---no claim discount coulmn | | | | | it should ask to put the value in I26 -- any value -- | | | | | | then it allow to caluculate the exact premium | | | | | | | | | | | | | | | | | This is to do because if I not prompt then I will give discount to all as per last record | | | But discount is based on some criteria -- Claim -- Age & Sum Insured | | | | | | | | | | | | | | | Thank you | | | | | | | | | | | | | | | | | -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- 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
Fw: $$Excel-Macros$$ Merge multiple Workbook
Hi,Any way to solve this problem.Sent from my BlackBerry 10 smartphone.From: Sandeep ChhajerSent: Sunday 24 January 2016 18:07To: Excel MacrosReply To: excel-macros@googlegroups.comSubject: $$Excel-Macros$$ Merge multiple WorkbookHi Excel guru,I have found macros for merging multiple workbook (kept in a single folder) into a single worksheet.But my requirement is a step ahead...can that macro to be changed to copy only specified column from every wrokbook (Sheet1). Like it will search in all the workbooks (sheet1 row no 1 to 6 ) kept in a folder; and wherever it will find "Name" , "Emp code" or " Net payment" then copy the range into new sheet one after one.the code I am using (got from website) for merging the workbooks are pasted below. (Any thing new to solve the above problem is also welcome)Sub simpleXlsMerger()Dim bookList As WorkbookDim mergeObj As Object, dirObj As Object, filesObj As Object, everyObj As ObjectApplication.ScreenUpdating = FalseSet mergeObj = CreateObject("Scripting.FileSystemObject") 'change folder path of excel files hereSet dirObj = mergeObj.Getfolder("C:\Working\MT\MT 2015 16\MT Q3\Actuas All ")Set filesObj = dirObj.FilesFor Each everyObj In filesObjSet bookList = Workbooks.Open(everyObj) 'change "A2" with cell reference of start point for every files here'for example "B3:IV" to merge all files start from columns B and rows 3'If you're files using more than IV column, change it to the latest column'Also change "A" column on "A65536" to the same column as start pointRange("A2:IV" & Range("A65536").End(xlUp).Row).CopyThisWorkbook.Worksheets(1).Activate 'Do not change the following column. It's not the same column as aboveRange("A65536").End(xlUp).Offset(1, 0).PasteSpecialApplication.CutCopyMode = FalsebookList.CloseNextEnd Sub Thanking you in advance.-- Regards,CA 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.
$$Excel-Macros$$ sort on 3 columns
Hi, automatic Sort with the macro recorder or normal sort with three levels do not give me the expected results. Sorting descending, between the same values in one column the other column is not sorting any more, until the value changed again. is there a routine already in VBA ? PS there is no marco included thx -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. sort3columns.xlsx Description: MS-Excel 2007 spreadsheet
Re: $$Excel-Macros$$ Prompt / Ask the value & then calculate value-- 3 rd reminder
Thanks for reply I get the solution from Vaibhav Bhai . It is working as per my query too On 26 January 2016 at 19:04, Paul Schreinerwrote: > To do what you're actually asking would take a great deal of programming. > > In Cell E26, a simple formula like: > =IF(G26>70,70,G26) > > would look at G26, and if it is more than 70, it returns 70. > Otherwise, it returns the actual value of G26. > > However, you said you want accept ANY VALUE if it's <= 70. > That means that you want to be able to enter directly into E26, which > would remove the formula. > > You COULD use Conditional Formatting to limit the value to 70. > That way, if someone entered something more than 70, then it would display > an error. > > If you REALLY want to enter text in E26 and have Excel check G26, you're > going to have to write a Change Event macro that runs whenever cell E26 is > changed. > > For item #3, what do you want to trigger the prompt for entering the > discount? > When you save the document? > when you enter the age? > when you open the document? > > either way, you're looking at a VBA event macro. > > *Paul* > - > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > - > > > On Tuesday, January 26, 2016 4:12 AM, big smile > wrote: > > > > I have send this query on 21 st -- No body reply. > > Is this possible or not > > > -- Forwarded message -- > From: *big smile* > Date: 21 January 2016 at 08:12 > Subject: $$Excel-Macros$$ Polite Reminer -- Prompt / Ask the value & then > calculate value > To: excel-macros@googlegroups.com > > > Hello Friends > > Any solution for my query . Is this possible ?? > > Then please take some time to resolve my query. > > Thanks & have a nice day ... > > Respected Friends > Information --- >> > This is sample file for the premium calcualtion as per Age & sum Insured > If any body age is more then 70 then I have to write in Cell -- G26 > For example age is 72 > I have written in G26 -- Age 72 > But the premium calculates only if I mention E26 as 70 > Otherwise the premium comes false > Query --- >> > 1] If I write anything in G26 -- above 71 then automatically in E26 -- 70 > comes > 2] If I write nothing in G26 -- then it should allow any value in E26 > 3] I should prompt or ask -- in I26 ---no claim discount coulmn > it should ask to put the value in I26 -- any value -- > then it allow to caluculate the exact premium > This is to do because if I not prompt then I will give discount to all as > per last record > But discount is based on some criteria -- Claim -- Age & Sum Insured > Thank you > -- > 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 https://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > > -- > 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. >
Re: $$Excel-Macros$$ sort on 3 columns
I'm having trouble understanding what you are trying to do.The terms don't quite make sense.Automatic sort? What is that?if you record a macro and define your sort, the issue is that the selected range becomes "hard-coded" into the macro.SortFields.Add Key:=Range("I2:I766") means that if you add records, then they will not be included in the sort.In the macro, you must first determine the total number of rows and use THAT value in the sort range. If you can supply your macros, perhaps I can try to modify them to suit. Paul- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley - On Tuesday, January 26, 2016 11:41 AM, Frank Vwrote: Hi, automatic Sort with the macro recorder or normal sort with three levels do not give me the expected results. Sorting descending, between the same values in one column the other column is not sorting any more, until the value changed again. is there a routine already in VBA ? PS there is no marco included thx -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.
Re: $$Excel-Macros$$ Unique Problem in unhanding sheet
Dear Paul, Thanks, But in this scenario I am not at all aware from where this password has come. can anyone help me how can I get rid of this. On Tue, Jan 26, 2016 at 1:39 AM, Paul Schreinerwrote: > I'm not sure what you are expecting. > When I open the file, my "Review" tab shows: > [image: Inline image] > > The highlighted "Protect Workbook" icon indicates that it's protected. > Double-clicking on it prompts for a password to unprotect. > > Whoever protected it evidently specifically locked out the ability to view > the hidden sheets. > along with the ability to create new sheets. > > *Paul* > - > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > - > > > On Monday, January 25, 2016 2:51 PM, Secret Shot > wrote: > > > > Dear Paul, > > thanks for looking in to it. But I am not getting any option to unprotect > it. if it is protected then I should get any option to protect it. but it > is not. > Neither worksheet showing protected, nor workbook giving me option to > unprotect it. > > pls suggest., > > On Sat, Jan 23, 2016 at 2:15 AM, Paul Schreiner > wrote: > > I'm afraid your workbook IS protected. > Unless you know the password, I'm afraid you will not be able to display > the hidden sheets. > > *Paul* > - > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > - > > > On Friday, January 22, 2016 2:50 PM, Secret Shot > wrote: > > > > Dear Expert, > > I am having this workbook, which have 4 sheet and 2 sheets are hide and I > want to unprotect them, but I am unable to do so. > > As none of the option is allowing me to unhide sheet. It says workbook is > protected but it is not. > > Please help in un-hiding the worksheets pls. > > > -- > Pankaj Pandey > Bhopal > -- > 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 https://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > > > -- > 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 https://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > > > > > -- > Pankaj Pandey > Bhopal > -- > 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
Re: $$Excel-Macros$$ Unique Problem in unhanding sheet
I'm afraid you'll have to seek elsewhere.This forum's rules state: 3) Don't post questions regarding breaking or bypassing any security measure. since we have no way of knowing if the person that CREATED the application are protecting their Intellectual Property, or there was another reason. If you were to Google something along the lines of "breaking Excel passwords",there are companies that (sometimes for a fee) will break a password. Paul- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley - On Tuesday, January 26, 2016 2:38 PM, Secret Shotwrote: Dear Paul, Thanks, But in this scenario I am not at all aware from where this password has come. can anyone help me how can I get rid of this. On Tue, Jan 26, 2016 at 1:39 AM, Paul Schreiner wrote: I'm not sure what you are expecting.When I open the file, my "Review" tab shows: The highlighted "Protect Workbook" icon indicates that it's protected.Double-clicking on it prompts for a password to unprotect. Whoever protected it evidently specifically locked out the ability to view the hidden sheets.along with the ability to create new sheets. Paul- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley - On Monday, January 25, 2016 2:51 PM, Secret Shot wrote: Dear Paul, thanks for looking in to it. But I am not getting any option to unprotect it. if it is protected then I should get any option to protect it. but it is not. Neither worksheet showing protected, nor workbook giving me option to unprotect it. pls suggest., On Sat, Jan 23, 2016 at 2:15 AM, Paul Schreiner wrote: I'm afraid your workbook IS protected.Unless you know the password, I'm afraid you will not be able to display the hidden sheets. Paul- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley - On Friday, January 22, 2016 2:50 PM, Secret Shot wrote: Dear Expert, I am having this workbook, which have 4 sheet and 2 sheets are hide and I want to unprotect them, but I am unable to do so. As none of the option is allowing me to unhide sheet. It says workbook is protected but it is not. Please help in un-hiding the worksheets pls. -- Pankaj Pandey Bhopal-- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- 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.
Re: $$Excel-Macros$$ database copy paste issue from one workbook to another workbook
Hi Paul, The code works. However, it doesn't achieve the desired result. The code doesn''t show all the updated data in the next blank row. It doesn't seem to compare the database in both workboooks. Cheers On Tuesday, 26 January 2016 21:20:47 UTC+8, Paul Schreiner wrote: > > I updated the macro to this. > give it a try: > > Option Explicit > Sub test() > Dim varSheetA As Variant > Dim varSheetB As Variant > Dim strRangeToCheck As String > Dim strRangeToC As String > Dim iRow As Long > Dim iCol As Long > Dim wbkA As Workbook > Dim eRow As Long > > Set wbkA = Workbooks.Open(Filename:="C:\temp\vba\fortest.xlsx") > strRangeToCheck = "A:C" > strRangeToC = "C:E" > 'Debug.Print Now > varSheetA = wbkA.Worksheets("Sheet1").Range(strRangeToCheck) > varSheetB = ThisWorkbook.Worksheets("Sheet1").Range(strRangeToC) > 'Debug.Print Now > 'Warning: VarSheetA and VarSheetB result in arrays of the ENTIRE > respective workbook > ' using LBound() to UBound() causes the ENTIRE workbook to be > processed, > ' regardless of how much is actually used. > ' I'd suggest using something like: > ' thisworkbook.select > ' MaxRow = ActiveCell.SpecialCells(xlLastCell).Row > ' MaxCol = ActiveCell.SpecialCells(xlLastCell).Column > ' For iRow = 1 to MaxRow > ' For iCol = 1 to MaxCol > '-- > For iRow = LBound(varSheetA, 1) To UBound(varSheetA, 1) > For iCol = LBound(varSheetA, 2) To UBound(varSheetA, 2) > If varSheetA(iRow, iCol) = varSheetB(iRow, iCol) Then > ' Cells are identical. > ' Do nothing. > Else > eRow = ThisWorkbook.Worksheets("Sheet1").Cells(Rows.Count, > 3).End(xlUp).Row + 1 > ThisWorkbook.Sheets("Sheet1").Range("C" & eRow & ":E" & > eRow).Value = wbkA.Sheets("Sheet1").Range("A" & iRow & ":C" & iRow).Value > Exit For > End If > Next > Next > wbkA.Close savechanges:=False > End Sub > *Paul* > - > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > - > > > On Monday, January 25, 2016 8:14 PM, Kat> wrote: > > > > Hi Paul, > > Please see attached the fortest.xlsx file for your attention. > > > Cheers > > On Tuesday, 26 January 2016 04:18:22 UTC+8, Paul Schreiner wrote: > > you've only sent the "Tested.xlsm" file > Can you please include the fortest.xlsx file? > Otherwise, I would need to GUESS what file looks like. > It LOOKS like you're comparing columns A-C in one workbook to range C-E in > another. > > However: > you have: > > Set varSheetA = wbkA.Worksheets("Sheet1") > Set varSheetB = ThisWorkbook.Worksheets(" Sheet1") > > followed by: > varSheetA = Worksheets("Sheet1").Range( strRangeToCheck) > varSheetB = Worksheets("Sheet1").Range( strRangeToC) > > which will cause varSheetA and varSheetB to be defined for the currently > active workbook. > > If you can send me a sample data file, I'd be glad to put something > together for you. > > > *Paul* > -- --- > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John > Wesley*-- > --- > > > On Sunday, January 24, 2016 8:32 PM, Kat wrote: > > > > Hi guys, > > I want to copy paste database from one Workbook A to Workbook B. When new > row data is added in Workbook A, the excel vba code will compare whether > the data is exist in Workbook B. If no, new row data needs to be copied and > pasted automatically to last existing row in Workbook B. I've had issue > with my code. Can anyone help me have a look? > > Thanks in advance. > > > -- > 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
Re: $$Excel-Macros$$ database copy paste issue from one workbook to another workbook
Hi Paul, If I run the command based on your comment that I use ThisWorkbook.Activate > MaxRow = ActiveCell.SpecialCells(xlLastCell).Row > MaxCol = ActiveCell.SpecialCells(xlLastCell).Column > For iRow = 1 To MaxRow > For iCol = 1 To MaxCol > Then the command below comes up with subscription out of range error. > If varSheetA(iRow, iCol) = varSheetB(iRow, iCol) Then > -- 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 https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.