Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

Retaining destination cell formats when copying by formula.

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
sts023
Asked:
sts023
  • 2
  • 2
2 Solutions
 
Rory ArchibaldCommented:
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
 
sts023Author Commented:
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
 
patrickabCommented:
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
 
sts023Author Commented:
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
 
patrickabCommented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now