Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]() Hello, < new member, but not new to pc I hope to keep the many questions I have on this same thread because it is a large project and it's a "as I go" type of thing. Not sure if this idea might work but I hope it turns out the become some sort of "library on same thread" ! This is the "fine tuning,interim" stage of a specific bookeeping system where I need to make sure it adds up in Excel then it will be programed where required. "Architecture stage", still. The macros are usualy recorded for repetitive tasks to utilize constant data changes in the form of figures and text. It is these figures Pasted in cells and formulated. Once the sums add up to expectation then it becomes part of the overall program development "blueprint" of basicaly the same. No programmers are involved, much of my work is self teach. There is much to learn, I hope this forum will be of assistance as much as I will offer some knowledge where I can. Question 1. Macro. Current Recording shows: Sheets("Data_A").Select Cells.Find(What:="TestA", After:=ActiveCell, LookIn:=xlValues, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Selection.Offset(1, 0).Select '*Down* < not recorded Selection.Copy Sheets("Data_B").Select Range("A1").Select Selection.Offset(1, 0).Select ' *Down* < not recorded ActiveSheet.Paste End Sub ================================= The Question: If the current macro code is, Sheets("Data_A").Select Cells.Find(What:="TestA", After:=ActiveCell, LookIn:=xlValues, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Then what is the code if the scenario is, data updated and pasted to, Anywhere in Sheets("Data_A") Find that same text and or nemerical value anywhere in Sheet ("Data_A") which is the same text and or nemerical value, constantly in Sheet B Cell A1 then go to that location in Sheet ( Data_A) Meaning, the same value of "Sheet_B A1" is not a fixed location as in "Sheet Data_A" when A is supdated. Next question: A1 B1 C1 5 5 = A1/B1*100 IF, A1 B1 C1 BLANK OR 0 = A1/B1*100 How do I write the formula so it does not show error or value, but to show 999.999 ? Thanks . More later, -- strung ------------------------------------------------------------------------ strung's Profile: http://www.excelforum.com/member.php...o&userid=24731 View this thread: http://www.excelforum.com/showthread...hreadid=383009 |
#2
![]() |
|||
|
|||
![]()
Hi!
For the 2nd question: =IF(ISERROR(A1/B1),999.999,A1/B1*100) Biff "strung" wrote in message ... Hello, < new member, but not new to pc I hope to keep the many questions I have on this same thread because it is a large project and it's a "as I go" type of thing. Not sure if this idea might work but I hope it turns out the become some sort of "library on same thread" ! This is the "fine tuning,interim" stage of a specific bookeeping system where I need to make sure it adds up in Excel then it will be programed where required. "Architecture stage", still. The macros are usualy recorded for repetitive tasks to utilize constant data changes in the form of figures and text. It is these figures Pasted in cells and formulated. Once the sums add up to expectation then it becomes part of the overall program development "blueprint" of basicaly the same. No programmers are involved, much of my work is self teach. There is much to learn, I hope this forum will be of assistance as much as I will offer some knowledge where I can. Question 1. Macro. Current Recording shows: Sheets("Data_A").Select Cells.Find(What:="TestA", After:=ActiveCell, LookIn:=xlValues, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Selection.Offset(1, 0).Select '*Down* < not recorded Selection.Copy Sheets("Data_B").Select Range("A1").Select Selection.Offset(1, 0).Select ' *Down* < not recorded ActiveSheet.Paste End Sub ================================= The Question: If the current macro code is, Sheets("Data_A").Select Cells.Find(What:="TestA", After:=ActiveCell, LookIn:=xlValues, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Then what is the code if the scenario is, data updated and pasted to, Anywhere in Sheets("Data_A") Find that same text and or nemerical value anywhere in Sheet ("Data_A") which is the same text and or nemerical value, constantly in Sheet B Cell A1 then go to that location in Sheet ( Data_A) Meaning, the same value of "Sheet_B A1" is not a fixed location as in "Sheet Data_A" when A is supdated. Next question: A1 B1 C1 5 5 = A1/B1*100 IF, A1 B1 C1 BLANK OR 0 = A1/B1*100 How do I write the formula so it does not show error or value, but to show 999.999 ? Thanks . More later, -- strung ------------------------------------------------------------------------ strung's Profile: http://www.excelforum.com/member.php...o&userid=24731 View this thread: http://www.excelforum.com/showthread...hreadid=383009 |
#3
![]() |
|||
|
|||
![]() Thanks biff. I hope this helps close those opened text files and no mouse kliks. It took me a while to discover part of the the same code had to be placed twice. ' Windows("TestLog.txt").Activate Cells.Select Selection.Delete Shift:=xlUp Range("A1").Select Application.CutCopyMode = False Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="C:\Macro Test\TestFile.txt", FileFormat:= _ xlText, CreateBackup:=False ActiveWorkbook.SaveAs Filename:="C:\Macro Test\TestFile.txt", FileFormat:= _ xlText, CreateBackup:=False ActiveWindow.Close End Sub ' -- strung ------------------------------------------------------------------------ strung's Profile: http://www.excelforum.com/member.php...o&userid=24731 View this thread: http://www.excelforum.com/showthread...hreadid=383009 |
#4
![]() |
|||
|
|||
![]() Thanks, got it the fisrt time. -- strung ------------------------------------------------------------------------ strung's Profile: http://www.excelforum.com/member.php...o&userid=24731 View this thread: http://www.excelforum.com/showthread...hreadid=383009 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula for current month minus one = Quarter number in a macro. | Excel Discussion (Misc queries) | |||
Macro - formula for end of last row | Excel Worksheet Functions | |||
Formula linked to cell with Macro | Excel Worksheet Functions | |||
Help with macro formula and variable | Excel Worksheet Functions | |||
Macro Formula revision? | Excel Worksheet Functions |