Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
strung
 
Posts: n/a
Default Macro and Formula


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   Report Post  
Biff
 
Posts: n/a
Default

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   Report Post  
strung
 
Posts: n/a
Default


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   Report Post  
strung
 
Posts: n/a
Default


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for current month minus one = Quarter number in a macro. Pank Excel Discussion (Misc queries) 11 June 22nd 05 02:47 PM
Macro - formula for end of last row Gary Brown Excel Worksheet Functions 1 June 1st 05 12:02 AM
Formula linked to cell with Macro Beginner Excel Worksheet Functions 0 March 30th 05 10:51 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Macro Formula revision? Mark Excel Worksheet Functions 1 November 28th 04 01:43 AM


All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"