Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Another Excel query!

Thread Tools
 
Search this Thread
 
Old 6th Nov 2006, 15:47
  #1 (permalink)  
Thread Starter
 
Join Date: Feb 2006
Location: Here and there
Posts: 216
Likes: 0
Received 0 Likes on 0 Posts
Another Excel query!

Once again, I am calling on my fellow pruners for help with Excel

Here's the situation: I want to copy data from spreadsheet one and paste it into a seperate spreadsheet, spreadsheet two. Sounds simple enough? Now here's the twist... This data transfer is meant as a way of updating spreadsheet two. This in itself is not a problem. The data being copied from spreadsheet one to spreadsheet two is pasted in using the 'paste special - values' function, as they are in fact formulae but I just want the values. New data is always being added to spreadsheet one, so the cell numbers are never the same.

However, the last eight rows of data to be copied are different formulae, as the data that these cells refer to is meant to be manipulated by the user, and I want to paste these into spreadsheet two using the 'paste special - formulae' function. I already have a working macro that copies all of the data from spreadsheet one to spreadsheet two, including the eight rows of user defined data, but it only copies the values. The obvious solution would be to reprogram the macro to copy these eight rows using the paste formulae function, and the rest of the data using the paste values function, but the last eight rows of data never have the same row numbers, because as soon as another entry is created it pushes them down a row. Also, the macro is extremely basic; all it does is copy a large block of cells regardless of what is in them from spreadsheet one and
pastes them into spreadsheet two.

So, because of this I cannot program the macro copy the last eight rows seperately. Anyone have any ideas? I'm hoping there might be a formula that compares the formulae of a set of cells and can differentiate between them (i.e. it can tell the difference between VLOOKUP and IF formulae) so that I can program the macro to paste cells with one type of formulae in them as formulaes, and other cells with another type of formulae as values.

Any ideas anyone?

Cheers,

Ox
Oxeagle is offline  
Old 6th Nov 2006, 17:02
  #2 (permalink)  
Spoon PPRuNerist & Mad Inistrator
 
Join Date: Sep 2003
Location: Twickenham, home of rugby
Posts: 7,426
Received 290 Likes on 184 Posts
Sounds like you need to start looking at VBA!

You might be better off looking at a site specifically catering for computing - e.g. eggheadcafe

SD
Saab Dastard is offline  
Old 7th Nov 2006, 10:59
  #3 (permalink)  
Thread Starter
 
Join Date: Feb 2006
Location: Here and there
Posts: 216
Likes: 0
Received 0 Likes on 0 Posts
Well, I managed to solve the problem without even realising initially! SD, i'm already using 6 VBA macros in this sheet to make all of the calculations work properly!

One last issue: I have VBA macros accessing data on worksheets that I want to hide. However, whenever I hide the worksheets and attempt to run the macros they display a run time error, as they cannot find the hidden sheets. Is there any parameter that you can enter in to the macro to tell it that the sheet it is looking for is hidden, and any way of allowing it to copy the data without unhiding the sheet?
Oxeagle is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.