LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Excel macro programming question


Hi Anne, I believe someone else pointed out that as long as you only use
that sheet with those values once, it will be OK to use most of the codes
that several of us offered. But, if you run the code before removing the
changed records, or in some way marking them as having already been halved
in column E, then the next time you run the macro, it will halve those
values again, making them 1/4 of the original value.
If the Fund code changes automatically after it is halved, no problem.
Otherwise, be careful.



"Anne" wrote in message
...
Hi Simon!
Well, I'm trying to make a very complex process of working with many Excel
files easy for non-Excel folks to use, so I thought a macro button called
"Fund42DivideBy2" would be helpful for them.

The 42 in column B is an accounting Fund number. It's formatted as a
number
value when it comes over from the data warehouse. There may be Fund 41s,
42s
and 43s in column B. I only want the ones that are Fund 42 to have their
amount paid (col. E) divided by 2.

Hopefully that helps a little. :)
Anne


"Simon Lloyd" wrote:


Anne you don't need a macro for this a simple formula will suffice,
however if you really want a macro could you tell me what "42" in column
B is? is it 42 items? a numeric value in any cell equating to 42?, a sum
of all column B being equal to or greater than 42?, or a text value
"42"?

Anne;407286 Wrote:
Hello!
I have a worksheet with cols. A, B, C, D, and E. I want to do an
if-then
statement in a macro that says, If B has "42" in it (no matter how long
the
worksheet is, because they will vary widely), then divide the amount
paid (E)
by 2.

B1 will always have Fund as its name; E1 will always have Amount Paid.
As
mentioned, the size of the worksheet may vary a lot, so I was thinking
I'd
use a range, but I'm not sure how to.

Example:
Columns
A B C D E
Row
1 Dept. Fund Vendor Desc Amount Paid

2 100 42 X Y 100.00

3 100 43 Z A 100.00

4 101 43 M G 100.00

After the code ran, E2 would be 50.00.

I'd like to put this in as a module, to make a little macro button for
it.
(I know how to do that.) Any help would be appreciated. --Anne



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:
http://www.thecodecage.com/forumz/member.php?userid=1
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=113514






 
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
Macro Programming Question mtbcpa Excel Discussion (Misc queries) 2 November 26th 07 04:51 PM
Newbie Excel Programming Question mtbcpa Excel Programming 0 November 23rd 07 06:11 PM
Beginner macro programming question highland Excel Programming 7 November 20th 07 08:09 PM
Excel Programming Question - VBA + WMI Jim Gregg Excel Programming 6 February 5th 06 07:05 AM
Need Help Please: EXCEL+Vb Programming Newbee Question [email protected] Excel Programming 1 February 9th 05 04:30 PM


All times are GMT +1. The time now is 08:20 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"