How to add a simple IF

CaptainCsaba

Board Regular
Joined
Dec 8, 2017
Messages
78
Hey!

So there is a part of our macro that gets part of the stuff we need. Recently our reports changed and it is easy to solve, but it was not me who made the macro and I find it hard to understand long formulas.

So what happens here is that a new worksheet is created called "Output", and the raw data is in "Input". So all the stuff we need get's to Output from Input. In output the following appears in cell A3 (in output):

Code:
=IF(Input!D1="/",Input!C1,0)

Based on this information, the following happens in Cell C3 (In output):

Code:
=IF(A3=0,0,IF(AND(Input!D1="/",Input!D6="/"),CONCATENATE(Input!F1," ",Input!G1," ",Input!H1," ",Input!I1," ",Input!J1," ",Input!K1," ",Input!L1," ",Input!M1," ",Input!N1," ",Input!O1," ",Input!P1," ",Input!Q1," ",Input!R1," ",Input!S1,Input!A2," ",Input!B2," ",Input!C2," ",Input!D2," ",Input!E2," ",Input!F2," ",Input!G2," ",Input!H2),CONCATENATE(Input!F1," ",Input!G1," ",Input!H1," ",Input!I1," ",Input!J1," ",Input!K1," ",Input!L1," ",Input!M1," ",Input!N1," ",Input!O1," ",Input!P1," ",Input!Q1," ",Input!R1," ",Input!S1)))

So if I understand this correctly, if something is 0 in A3, that doe snot get used later, however if something different appears there then the rest of the row gets "concentrated", so put together from F1, if I get this correctly.

What changed is that sometimes the report comes in a format, where the things that get concentrated from F1 in input don't appear there, ion the cells below, from cell A to all the way it lasts. So what we need to create is a code that says "do what you did before, however, if cell F1 and so on is empty, then concentrate the cells below from input. Can this be done with a simple IF formula somehow, or somehow else?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,213,494
Messages
6,113,981
Members
448,538
Latest member
alex78

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
Back
Top