Macro and Formula

S

strung

Hello, < new member, but not new to pc >

I hope to keep the many questions I have on this same thread because i
is a large project and it's a "as I go" type of thing. Not sure if thi
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 syste
where I need to make sure it adds up in Excel then it will be programe
where required.
"Architecture stage", still.

The macros are usualy recorded for repetitive tasks to utilize constan
data changes in the form of figures and text.
It is these figures Pasted in cells and formulated. Once the sums ad
up to expectation then it becomes part of the overall progra
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 muc
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 Shee
("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 i
"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
 
S

strung

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 b
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
 
Top