Question on what I think is IF function!!

rallynut

New Member
Joined
Jan 25, 2005
Messages
6
:eek: I am trying to get 2 spreadsheets to link together but I only want certain information from the first to be transferred to the second - my biggest problem is that I am using text.

for example, In the first spreadsheet I would like to copy the whole of row 1 only if cell C1 contains the letters HFL. If these letters are anything else then I don't want that row copied...

Can anyone help?!! :rolleyes: :pray:
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

staticbob

Well-known Member
Joined
Oct 7, 2003
Messages
1,079
Hi Rallynut, Welcome to the board !

Are you using formula to copy this data or VBA Code ?

With a formula, you can use a simple if statement.

In cell A1 of the NEW spreadsheet type . .

=IF('[filename.xls]Sheet1'!$A$3="HFL",'[filename.xls]Sheet1'!A1,0)

. . then drag this accross the row with the fill handle.

NOTE - Replace "filename" and sheet1 with the relevant info from your source file.

HTH
Bob
 

rallynut

New Member
Joined
Jan 25, 2005
Messages
6
Hi Bob,

Thanks for your reply, I have been using formula as I wouldn't recognise VBA code if it hit me over the head!!

I'll try your solution and get back...
 

rallynut

New Member
Joined
Jan 25, 2005
Messages
6
Hi Bob,

I'm not sure if I'm doing something wrong here but I have tried it and no joy...

I just get #name?

Do you have a VBA solution - I'm willing to try anything! :oops:
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201

ADVERTISEMENT

Care to post a small sample?
 

rallynut

New Member
Joined
Jan 25, 2005
Messages
6
How do I post a sample?

I thought I had it cracked thanks to Bob, but when I copy the cells across, if I take out the dollar signs it only recognises cell A3 for example instead of checking column 3 on each row for the letters and if I leave them in I can't copy across!!!! Help!!
 

staticbob

Well-known Member
Joined
Oct 7, 2003
Messages
1,079

ADVERTISEMENT

RN,

You need to keep the dollar signs in mate, but like this A$3 rather than the absolute reference ($A$3) I gave you initially.

Try that.

To post a sample, look at the pinned topics at the top of the forum. In particular . .

HTML Maker FAQ (How to show your sheet on the board)


Bob
 

rallynut

New Member
Joined
Jan 25, 2005
Messages
6

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
You need to post a sample of source data that, based on a condition, must be transferred to a different area.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,518
Messages
5,596,630
Members
414,082
Latest member
sasmita

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top