Solved

VBA Excel - Error checking cell value on cells containing TRANSPOSE forumla

Posted on 2013-01-17
1
559 Views
Last Modified: 2013-01-19
Hi,

I have a range of cells that I need to check if they are empty or 0.

The cells contain a formula "=TRANSPOSE(''A2:JK8)"

As a result, any time I try to check the cell value or modify the cell value I seem to get "type mismatch" errors.

If Range("A2:JK8").value = "" Then

Open in new window


Can anybody help me get around this?

I attempted to convert the cell to a value (and remove the formula) but I got an error "cannot change part of an array".
Range("A2:JK8").value = Range("A2:JK8").value

Open in new window


Thankyou
0
Comment
Question by:mhdi
[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
1 Comment
 
LVL 24

Accepted Solution

by:
Steve earned 500 total points
ID: 38791966
Which cells contain the TRANSPOSE formula, it will not just be one cell but an array of cells.

You need to work with the array of cells holding transpose formula.

Simple Example workbook attached.

To change the cells to values use:

Sheets("Sheet2").Range("B2:H283").value = Sheets("Sheet2").Range("B2:H283").value

Open in new window

Transpose-VBA-Example.xlsm
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
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.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

739 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