Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

excel vba

ResolvedVersion 2010

Freddie has attended:
Excel VBA Introduction course

Excel VBA

Hi Guys

This is probably quite a basic IF function question here, but I seem to be struggling with this a lot!

What I have is the below:

Sheets("AUD").Select
Range("D4").Select
Do Until ActiveCell.Offset(0, -1) = ""
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-3],RC[-2],RC[-1])"
ActiveCell.Offset(1, 0).Select
Loop
If ActiveCell.Offset(0, -1) = " " Then
ActiveCell.Offset(3, 0).Select
End If
End Sub


What I'm trying to achieve is the following; to concatenate the prior 3 cells, until the activell offset (0,-1) is blank, BUT if the activecell offset(0,-1) is blank then to jump down 3 cells and continue to concatenate the prior 3 cells. I'm a little unsure to what formula to use as and when it comes to the end of concatenating the data.

Any help is greatly appreciated.

Thanks!

Freddie

RE: Excel VBA

Hi Freddie,

Thank you for your question. Would it be possible to email me an extract from your worksheet? It helps me to write the code if I can see the real data in front of me.

The email address is forum@stl-training.co.uk

Kind regards
Marius Barnard
Best STL

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

How to Remove Duplication's from a selection of data in an Excel 2010 Worksheet

It would take far too much time to scan through rows and rows of data to find and remove duplicate data. So, here's how to do this using a much more efficient method:-

1) Select the data that might contain duplication's
2) Click the ''Data'' tab
3) Go to ''Data Tools'' and click ''Remove Duplicates''
4) A box will appear. Tick the boxes of the columns that you want to use to check for duplicates. Finally, click ''OK.''

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.