Solved

Retaining destination cell formats when copying by formula.

Posted on 2011-02-17
5
237 Views
Last Modified: 2012-05-11
Hello!
Im working with Excel 2003.
I have a formula in a cell which copies an entry from a static set of values, selecting the value with the OFFSET function.
in consecutive cells A1, B1, C1 etc. in a row I will have
=OFFSET('Static Set'!A1,0,7-AFixedValuel,,1), then
=OFFSET('Static Set'!B1,0,7-AFixedValuel,,1), then
=OFFSET('Static Set'!C1,0,7-AFixedValuel,,1) etc.
In this way, as "AFixedValue"  changes, the "string" of consecutive static values appears in the destination cells.
My problem is that the destination cells have a coloured background, which is destroyed by the formula, 'cos the formula "copies" the formatting of the "Source" cell.
I can't use "Paste Special", as this is a Formula.
I was hoping there was a function like CELLVALUEONLY (or some such), so I couk rewrite the destination cell's formula as
=CELLVALUEONLY(OFFSET('Static Set'!B1,0,7-AFixedValuel,,1))
Unfortunately, I can't find anything like CELLVALUEONLY as a function.
Have any of you good people found a workaround, or am I barking up a blue herring?

Steve
0
Comment
Question by:sts023
  • 2
  • 2
5 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 250 total points
ID: 34917987
Using an OFFSET (or any other) formula should not affect the formatting of the cell it is in (unless you are applying that formatting by Conditional Formatting).
0
 

Author Comment

by:sts023
ID: 34919556
Hi Rorya,

That's what I thought, but it does!

I'm actually trying to develop this process at a centre I volunteer at, and I've noticed other minor discrepancies before.

I'm running under Vista, they're running under XP. We both have Excel 2003.

Does anyone know of any "global" settings which may be having this effect?
I've tried looking for some setting such as "always use source formatting in formulae", but as I couldn't find anything, I thought I'd post the query.

It's a bit of a head-scratcher, and my experience says there will be a simple solution/reason, it's just that at the moment it escapes me!

Steve
0
 
LVL 45

Assisted Solution

by:patrickab
patrickab earned 250 total points
ID: 34933069
Steve,

There a button you can add to your standard command bar that will Paste Values only. At the right hand end of the Command Bar click the down arrow and select 'Add or remove button', select Customize/Commands/Edit and find the 'Paste Values' button which is a clipboard with a 12 on it - add that button.

Having done that all you need to do is copy the source cell, and use the new button to paste the value into the destination cell.

Patrick
0
 

Author Comment

by:sts023
ID: 34933181
Hi guys....

The original problem was caused by an idiot - me!

I hadn't realised I was executing a standard Copy & Paste function. Now I've woken up, and purely for you guys having the kindness to reply to an idiot, I'm sharing the points between you.

Thanks for everything - my life's changing again (redundancy), so good luck to you all in the future....

Steve
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34933254
Steve,

Thanks for the points.

Don't be too downhearted about redundancy. It's just the way of the world. Pick yourself up again and keep going.

Patrick
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now