Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Corey
 
Posts: n/a
Default Macro Formula

All of my macros to date are for formatting, so I'm running into a bit of a
problem for a formula macro. I tend to use this formula often when using
pivot tables, as I need the left most column of the pivot table to poplulate
on every row. For example, the pivot table will result the following:

John Green 2
Red 3
Brown 4
Julie Green 1
Red 2
Brown 3

I really need it to list the names on each row. So I tend to copy the table
and paste it as a value, then use the following formula in the immediate
column to the left of the table data to populate:

=IF(G22="",IF(F21="",G21,F21),G22)

Of course this must be relative to the copied cells position. How can I
write the macro for this and still keep the cell referencing correct?

Any help is much appreciated. Thanks!




 
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
moving the formula "average" over one column in a macro drumstu Excel Worksheet Functions 1 August 23rd 05 08:01 PM
Formula for current month minus one = Quarter number in a macro. Pank Excel Discussion (Misc queries) 11 June 22nd 05 02:47 PM
Help on Macro or Formula Nigel Excel Discussion (Misc queries) 2 June 13th 05 01:27 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Fill Formula - Macro Cathy U Excel Discussion (Misc queries) 2 February 22nd 05 04:48 PM


All times are GMT +1. The time now is 05:26 PM.

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"