Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Retaining destination cell formats when copying by formula.

Posted on 2011-02-17
5
Medium Priority
?
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 1000 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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

721 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